Module io.helidon.service.registry
Package io.helidon.service.registry
Class Dependency.BuilderBase.DependencyImpl
java.lang.Object
io.helidon.service.registry.Dependency.BuilderBase.DependencyImpl
- All Implemented Interfaces:
Prototype.Api
,Dependency
- Enclosing class:
Dependency.BuilderBase<BUILDER extends Dependency.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Dependency>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.service.registry.Dependency
Dependency.Builder, Dependency.BuilderBase<BUILDER extends Dependency.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Dependency> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DependencyImpl
(Dependency.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionaccess()
The access modifier on the injection point/receiver.The annotations on this element, excludingDependency.qualifiers()
.Cardinality of this dependency.contract()
Each dependency ia a specific contract.GenericType
<?> Generic type equivalent toDependency.contract()
.Descriptor declaring this dependency.Field name that declares this dependency in theDependency.descriptor()
.Kind of element we inject into (constructor, field, method).boolean
int
hashCode()
boolean
Whether this dependency usesServiceInstance
.boolean
Whether this dependency uses aSupplier
instead of a direct instance.method()
Top level method that declares this method.name()
Name of the constructor parameter.The qualifier type annotations on this element.service()
Type name of the service that uses this dependency.toString()
typeName()
Type of the dependency (exact parameter type with all generics).
-
Constructor Details
-
DependencyImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
service
Description copied from interface:Dependency
Type name of the service that uses this dependency.- Specified by:
service
in interfaceDependency
- Returns:
- the service declaring this dependency
-
name
Description copied from interface:Dependency
Name of the constructor parameter.- Specified by:
name
in interfaceDependency
- Returns:
- unique name of the parameter
-
contract
Description copied from interface:Dependency
Each dependency ia a specific contract. Each service provides one or more contracts for dependencies. For example forList<MyService>
, the contract isMyService
.- Specified by:
contract
in interfaceDependency
- Returns:
- contract of the service we depend on
-
contractType
Description copied from interface:Dependency
Generic type equivalent toDependency.contract()
. We need both, to prevent reflection at runtime.- Specified by:
contractType
in interfaceDependency
- Returns:
- generic type of the dependency
-
descriptor
Description copied from interface:Dependency
Descriptor declaring this dependency. Descriptor is always public.- Specified by:
descriptor
in interfaceDependency
- Returns:
- descriptor
-
descriptorConstant
Description copied from interface:Dependency
Field name that declares this dependency in theDependency.descriptor()
. Can be used for code generation. This field is always a public constant.- Specified by:
descriptorConstant
in interfaceDependency
- Returns:
- field that has the dependency on the descriptor type
-
typeName
Description copied from interface:Dependency
Type of the dependency (exact parameter type with all generics).- Specified by:
typeName
in interfaceDependency
- Returns:
- type of the dependency as
TypeName
-
elementKind
Description copied from interface:Dependency
Kind of element we inject into (constructor, field, method).- Specified by:
elementKind
in interfaceDependency
- Returns:
- element kind (for parameters, the containing element)
-
qualifiers
Description copied from interface:Dependency
The qualifier type annotations on this element.- Specified by:
qualifiers
in interfaceDependency
- Returns:
- the qualifier type annotations on this element
-
access
Description copied from interface:Dependency
The access modifier on the injection point/receiver. Defaults toAccessModifier.PACKAGE_PRIVATE
.- Specified by:
access
in interfaceDependency
- Returns:
- the access
-
annotations
Description copied from interface:Dependency
The annotations on this element, excludingDependency.qualifiers()
.- Specified by:
annotations
in interfaceDependency
- Returns:
- the annotations on this element
-
method
Description copied from interface:Dependency
Top level method that declares this method. This is to provide information about overridden methods, as we should only inject such methods once.- Specified by:
method
in interfaceDependency
- Returns:
- unique identification of a declaring method
-
cardinality
Description copied from interface:Dependency
Cardinality of this dependency. Defaults toDependencyCardinality.REQUIRED
.- Specified by:
cardinality
in interfaceDependency
- Returns:
- cardinality of this dependency
-
isServiceInstance
public boolean isServiceInstance()Description copied from interface:Dependency
Whether this dependency usesServiceInstance
. Defaults tofalse
, which means the service is injected via its contract.- Specified by:
isServiceInstance
in interfaceDependency
- Returns:
- whether the dependency is declared as a
ServiceInstance
-
isSupplier
public boolean isSupplier()Description copied from interface:Dependency
Whether this dependency uses aSupplier
instead of a direct instance. This defaults tofalse
.- Specified by:
isSupplier
in interfaceDependency
- Returns:
- whether the dependency injection point uses a supplier
-
toString
-
equals
-
hashCode
public int hashCode()
-