Class StrategySelectorBuilder
java.lang.Object
org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder
Builder for
StrategySelector
instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> void
addExplicitStrategyRegistration
(Class<T> strategy, Class<? extends T> implementation, String name) Adds an explicit (as opposed to discovered) strategy registration.<T> void
addExplicitStrategyRegistration
(StrategyRegistration<T> strategyRegistration) Adds an explicit (as opposed to discovered) strategy registration.buildSelector
(ClassLoaderService classLoaderService) Builds the selector.
-
Constructor Details
-
StrategySelectorBuilder
public StrategySelectorBuilder()
-
-
Method Details
-
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 strategyimplementation
- The strategy implementationname
- The registered name
-
addExplicitStrategyRegistration
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
Builds the selector.- Parameters:
classLoaderService
- The class loading service used to (attempt to) resolve any un-registered strategy implementations.- Returns:
- The selector.
-