Remove EagerlyLoaded.

This commit is contained in:
Jeremy Wood 2023-03-26 14:10:26 -04:00
parent 16db616546
commit 75998ae2c3
No known key found for this signature in database
GPG Key ID: C5BAD04C77B91B4B
2 changed files with 1 additions and 12 deletions

View File

@ -1,10 +0,0 @@
package com.onarandombox.MultiverseCore.inject;
import org.jvnet.hk2.annotations.Contract;
/**
* Marker interface for services belonging to a plugin that should be eagerly initialized when service injection is
* set up for the owning plugin.
*/
@Contract
public interface EagerlyLoaded { }

View File

@ -83,8 +83,7 @@ public final class PluginInjection {
private Try<ServiceLocator> load() {
return Try.runRunnable(() -> ServiceLocatorUtilities.bind(pluginServiceLocator, pluginBinder))
.flatMap(ignored -> populatePluginServiceLocator(pluginServiceLocator, plugin))
.andThenTry(locator -> locator.getAllServices(EagerlyLoaded.class));
.flatMap(ignored -> populatePluginServiceLocator(pluginServiceLocator, plugin));
}
@NotNull