Package oracle.dbtools.plugin.api.types
Class TypeDependency
- java.lang.Object
-
- oracle.dbtools.plugin.api.types.TypeDependency
-
public class TypeDependency extends java.lang.ObjectEncapsulates 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 theTypeDependency.Kindenumeration. The specific type implementation to be injected can be constrained usingQualifierannotations, specifically theNamedannotation- Since:
- 19.3.0
- Author:
- cdivilly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeDependency.KindEnumerates how a type will be injected at a particular injetion site
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdescription()Provides a textual description of a dependencybooleanequals(java.lang.Object obj)static TypeDependencyfrom(TypeDependency.Kind kind, TypeQualifier<?> service)Produce aTypeDependencyinstanceinthashCode()booleanisEmpty()Indicates if this dependency has any qualifiersbooleanisRequired()TypeDependency.Kindkind()Characterizes how the dependency is injectedTypeQualifier<?>qualifier()The constraints on which implementation of the type to injectjava.lang.Stringselector()Produces the source code to replicate the selection of this dependencyjava.lang.StringtoString()java.lang.Class<?>type()TheClassfor the type to be injected
-
-
-
Method Detail
-
description
public java.lang.String description()
Provides a textual description of a dependency- Returns:
- String containing a description of the dependency
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isEmpty
public boolean isEmpty()
Indicates if this dependency has any qualifiers- Returns:
- true if the dependency has no qualifiers
-
isRequired
public boolean isRequired()
-
kind
public TypeDependency.Kind kind()
Characterizes how the dependency is injected- Returns:
TypeDependency.Kindinstance
-
qualifier
public TypeQualifier<?> qualifier()
The constraints on which implementation of the type to inject- Returns:
TypeQualifierinstance
-
selector
public java.lang.String selector()
Produces the source code to replicate the selection of this dependency- Returns:
- The source code to choose this dependency
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
type
public java.lang.Class<?> type()
TheClassfor the type to be injected- Returns:
- The type of the dependency
-
from
public static TypeDependency from(TypeDependency.Kind kind, TypeQualifier<?> service)
Produce aTypeDependencyinstance- Parameters:
kind- TheTypeDependency.Kindof the dependencyservice- The service that is depended on- Returns:
TypeDependencyinstance
-
-