类 StrategySelectorBuilder


  • public class StrategySelectorBuilder
    extends Object
    Builder for StrategySelector instances.
    作者:
    Steve Ebersole
    • 构造器详细资料

      • StrategySelectorBuilder

        public StrategySelectorBuilder()
    • 方法详细资料

      • addExplicitStrategyRegistration

        public <T> void addExplicitStrategyRegistration​(Class<T> strategy,
                                                        Class<? extends T> implementation,
                                                        String name)
        Adds an explicit (as opposed to discovered) strategy registration.
        类型参数:
        T - The type of the strategy. Used to make sure that the strategy and implementation are type compatible.
        参数:
        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.
        类型参数:
        T - The type of the strategy. Used to make sure that the strategy and implementation are type compatible.
        参数:
        strategyRegistration - The strategy implementation registration.
      • buildSelector

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