Package oracle.dbtools.plugin.api.types
Class TypeInstantiator<T>
java.lang.Object
oracle.dbtools.plugin.api.types.TypeInstantiator<T>
- Type Parameters:
T- The type of object to instantiate
TypeInstantiator implementations are responsible for instantiating
instances of type TypeInstantiator.- Since:
- 19.3.0
- Author:
- cdivilly
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeInstantiator(Class<T> type) Constructor for a customTypeInstantiatorimplementationprotectedTypeInstantiator(Class<T> type, boolean custom) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleandependenciesSatisfied(InstanceLocator locator) Used to determine if the dependencies for the constructor are satisfied.booleanisCustom()Indicates if this is a custom instantiator for this type, or a generic one provided by the dependency injection frameworkabstract Tload(InstanceLocator locator) Instantiate the instance of Tprotected final TypeDependencyNotAvailableExceptionnotAvailable(Throwable cause) type()The type that will be instantiated
-
Constructor Details
-
TypeInstantiator
Constructor for a customTypeInstantiatorimplementation- Parameters:
type- The type that will be instantiated
-
TypeInstantiator
Constructor- Parameters:
type- The type that will be instantiatedcustom- if true indicates this is a customTypeInstantiatorimplementation, as opposed to one generated by the dependency injection runtime
-
-
Method Details
-
isCustom
public boolean isCustom()Indicates if this is a custom instantiator for this type, or a generic one provided by the dependency injection framework- Returns:
- true if this is a custom instantiator, false if this is a generic instantiator
-
load
Instantiate the instance of T- Parameters:
locator- TheInstanceLocatorthat provides the dependencies required to instantiate T- Returns:
- instance of T
- Throws:
TypeDependencyNotAvailableException- if the type could not be instantiated
-
type
The type that will be instantiated- Returns:
- The type that this
TypeInstantiatorinstantiates
-
notAvailable
-
dependenciesSatisfied
Used to determine if the dependencies for the constructor are satisfied.- Parameters:
locator-- Returns:
-