Declare two public methods of a final class static
These methods access only static members. They are methods of a final class, which means no subclass can ever override these methods and use dynamic dispatch to choose the implementation at run time. So declaring these methods static is (statically) safe.
This commit is contained in:
parent
aa39fc63d5
commit
237b49a425
|
@ -94,7 +94,7 @@ public final /* singleton */ class AndroidEntryPointManager implements Serializa
|
|||
/**
|
||||
* Determines if any EntryPoint extends the specified component.
|
||||
*/
|
||||
public boolean EPContainAny(AndroidComponent compo) {
|
||||
public static boolean EPContainAny(AndroidComponent compo) {
|
||||
for (AndroidEntryPoint ep: ENTRIES) {
|
||||
if (ep.belongsTo(compo)) {
|
||||
return true;
|
||||
|
@ -110,7 +110,7 @@ public final /* singleton */ class AndroidEntryPointManager implements Serializa
|
|||
MANAGER = new AndroidEntryPointManager();
|
||||
}
|
||||
|
||||
public Set<TypeReference> getComponents() {
|
||||
public static Set<TypeReference> getComponents() {
|
||||
if (ENTRIES.isEmpty()) {
|
||||
throw new IllegalStateException("No entrypoints loaded yet.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue