Package oracle.dbtools.plugin.api.types
Enum Class TypeDependency.Kind
- All Implemented Interfaces:
Serializable,Comparable<TypeDependency.Kind>,Constable
- Enclosing class:
- TypeDependency
Enumerates how a type will be injected at a particular injetion site
- Author:
- cdivilly
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll available implementations of the type (matching theTypeQualifier) are injectedThe dependency is injected if available, otherwise a null value is supplied.The dependency is injected via aProviderinstance, resolving of the dependency is deferred untilProvider.get()is invoked.The default injection kind, one instance of the required dependency must be available or else instantiation of the type is abandoned andTypeDependencyNotAvailableExceptionis raised -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeDependency.KindReturns the enum constant of this class with the specified name.static TypeDependency.Kind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MULTIPLE
All available implementations of the type (matching theTypeQualifier) are injected@Inject SomeType(final Iterable<SomeOtherType> providers) { ... } -
OPTIONAL
The dependency is injected if available, otherwise a null value is supplied. Cannot be used for primitive type injections,MULTIPLEorPROVIDERinjections@Inject SomeType(final @Optional SomeOtherType provider) { ... }- The injection site uses the
Optionalannotation to indicate the dependency is optional
- The injection site uses the
-
PROVIDER
The dependency is injected via aProviderinstance, resolving of the dependency is deferred untilProvider.get()is invoked. This can be used for lazy initialization and to break cyclic dependencies@Inject SomeType(final Provider<SomeOtherType> provider) { ... }- The injection site uses a parameterized
Providerdeclaration to receive the matchingProvider
- The injection site uses a parameterized
-
REQUIRED
The default injection kind, one instance of the required dependency must be available or else instantiation of the type is abandoned andTypeDependencyNotAvailableExceptionis raised@Inject SomeType(final SomeOtherType provider) { ... }- The injection site uses the
Optionalannotation to indicate the dependency is optional
- The injection site uses the
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-