Class AccessorFactoryLoader

java.lang.Object
dev.derklaro.reflexion.internal.AccessorFactoryLoader

public final class AccessorFactoryLoader extends Object
Internal: loads the best accessor factory for the current environment of the jvm.
Since:
1.0
  • Field Details

    • DEFAULT_FACTORIES

      private static final AccessorFactory[] DEFAULT_FACTORIES
  • Constructor Details

    • AccessorFactoryLoader

      private AccessorFactoryLoader()
  • Method Details

    • doLoadFactory

      @NotNull public static @NotNull AccessorFactory 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.