Class ServiceLoaderUtil
java.lang.Object
io.github.kosmx.emotes.common.tools.ServiceLoaderUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends IEmotecraftService>
Optional<T> loadOptionalService(Class<T> serviceClass) static <T extends IEmotecraftService>
TloadService(Class<T> serviceClass) static <T extends IEmotecraftService>
TloadService(Class<T> serviceClass, Supplier<? extends T> defaultService) static <T extends IEmotecraftService>
Stream<T> loadServices(Class<T> serviceClass) static <T extends IEmotecraftService>
Stream<T> loadServicesSorted(Class<T> serviceClass)
-
Field Details
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY- See Also:
-
HIGHEST_PRIORITY
public static final int HIGHEST_PRIORITY- See Also:
-
LOWEST_PRIORITY
public static final int LOWEST_PRIORITY- See Also:
-
-
Constructor Details
-
ServiceLoaderUtil
public ServiceLoaderUtil()
-
-
Method Details
-
loadServices
-
loadServicesSorted
-
loadService
public static <T extends IEmotecraftService> T loadService(Class<T> serviceClass, Supplier<? extends T> defaultService) -
loadService
-
loadOptionalService
-