Class StrategySelectorBuilder

    • Constructor Detail

      • StrategySelectorBuilder

        public StrategySelectorBuilder()
    • Method Detail

      • addExplicitStrategyRegistration

        public <T> void addExplicitStrategyRegistration​(Class<T> strategy,
                                                        Class<? extends T> implementation,
                                                        String name)
        Adds an explicit (as opposed to discovered) strategy registration.
        Type Parameters:
        T - The type of the strategy. Used to make sure that the strategy and implementation are type compatible.
        Parameters:
        strategy - The strategy
        implementation - The strategy implementation
        name - The registered name
      • addExplicitStrategyRegistration

        public <T> void addExplicitStrategyRegistration​(StrategyRegistration<T> strategyRegistration)
        Adds an explicit (as opposed to discovered) strategy registration.
        Type Parameters:
        T - The type of the strategy. Used to make sure that the strategy and implementation are type compatible.
        Parameters:
        strategyRegistration - The strategy implementation registration.
      • buildSelector

        public StrategySelector buildSelector​(ClassLoaderService classLoaderService)
        Builds the selector.
        Parameters:
        classLoaderService - The class loading service used to (attempt to) resolve any un-registered strategy implementations.
        Returns:
        The selector.