Class AccessorFactoryLoader
java.lang.Object
dev.derklaro.reflexion.internal.AccessorFactoryLoader
Internal: loads the best accessor factory for the current environment of the jvm.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull AccessorFactoryLoads the best factory for the current environment, also making use of the service loader to allow other libraries to opt in and offer their own implementation of an accessor factory.
-
Field Details
-
DEFAULT_FACTORIES
-
-
Constructor Details
-
AccessorFactoryLoader
private AccessorFactoryLoader()
-
-
Method Details
-
doLoadFactory
Loads the best factory for the current environment, also making use of the service loader to allow other libraries to opt in and offer their own implementation of an accessor factory. The factories are sorted based on their implementation of comparable and the best matching one will be used in the environment.- Returns:
- the best accessor factory for the current jvm environment.
- Throws:
IllegalStateException- if no accessor factories are available.
-