Package oracle.dbtools.plugin.api.types
Class TypeDependency
java.lang.Object
oracle.dbtools.plugin.api.types.TypeDependency
Encapsulates a single dependency of a type. One type can depend on another in
a number of different ways depending on the nature of how the dependent type
is injected. These differences are captured in the
TypeDependency.Kind enumeration.
The specific type implementation to be injected can be constrained using
Qualifier annotations, specifically the Named annotation- Since:
- 19.3.0
- Author:
- cdivilly
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumerates how a type will be injected at a particular injetion site -
Method Summary
Modifier and TypeMethodDescriptionProvides a textual description of a dependencybooleanstatic TypeDependencyfrom(TypeDependency.Kind kind, TypeQualifier<?> service) Produce aTypeDependencyinstanceinthashCode()booleanisEmpty()Indicates if this dependency has any qualifiersbooleankind()Characterizes how the dependency is injectedThe constraints on which implementation of the type to injectselector()Produces the source code to replicate the selection of this dependencytoString()Class<?>type()TheClassfor the type to be injected
-
Method Details
-
description
Provides a textual description of a dependency- Returns:
- String containing a description of the dependency
-
equals
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty()Indicates if this dependency has any qualifiers- Returns:
- true if the dependency has no qualifiers
-
isRequired
public boolean isRequired() -
kind
Characterizes how the dependency is injected- Returns:
TypeDependency.Kindinstance
-
qualifier
The constraints on which implementation of the type to inject- Returns:
TypeQualifierinstance
-
selector
Produces the source code to replicate the selection of this dependency- Returns:
- The source code to choose this dependency
-
toString
-
type
TheClassfor the type to be injected- Returns:
- The type of the dependency
-
from
Produce aTypeDependencyinstance- Parameters:
kind- TheTypeDependency.Kindof the dependencyservice- The service that is depended on- Returns:
TypeDependencyinstance
-