Module io.helidon.service.registry
Package io.helidon.service.registry
Class Dependency.BuilderBase<BUILDER extends Dependency.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Dependency>
java.lang.Object
io.helidon.service.registry.Dependency.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
Dependency.Builder
- Enclosing interface:
Dependency
public abstract static class Dependency.BuilderBase<BUILDER extends Dependency.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Dependency>
extends Object
implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for
Dependency
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncontract()
Each dependency ia a specific contract.Each dependency ia a specific contract.contract
(Consumer<TypeName.Builder> consumer) Each dependency ia a specific contract.Each dependency ia a specific contract.GenericType
<?> Generic type equivalent toDependencyBlueprint.contract()
.contractType
(GenericType<?> contractType) Generic type equivalent toDependencyBlueprint.contract()
.Descriptor declaring this dependency.descriptor
(TypeName descriptor) Descriptor declaring this dependency.descriptor
(Consumer<TypeName.Builder> consumer) Descriptor declaring this dependency.descriptor
(Supplier<? extends TypeName> supplier) Descriptor declaring this dependency.Field name that declares this dependency in theDependencyBlueprint.descriptor()
.descriptorConstant
(String descriptorConstant) Field name that declares this dependency in theDependencyBlueprint.descriptor()
.from
(Dependency prototype) Update this builder from an existing prototype instance.from
(Dependency.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()
Name of the constructor parameter.Name of the constructor parameter.protected void
Handles providers and decorators.service()
Type name of the service that uses this dependency.Type name of the service that uses this dependency.service
(Consumer<TypeName.Builder> consumer) Type name of the service that uses this dependency.Type name of the service that uses this dependency.toString()
typeName()
Type of the dependency (exact parameter type with all generics).Type of the dependency (exact parameter type with all generics).typeName
(Consumer<TypeName.Builder> consumer) Type of the dependency (exact parameter type with all generics).Type of the dependency (exact parameter type with all generics).protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
service
Type name of the service that uses this dependency.- Parameters:
service
- the service declaring this dependency- Returns:
- updated builder instance
- See Also:
-
service
Type name of the service that uses this dependency.- Parameters:
consumer
- consumer of builder for the service declaring this dependency- Returns:
- updated builder instance
- See Also:
-
service
Type name of the service that uses this dependency.- Parameters:
supplier
- supplier of the service declaring this dependency- Returns:
- updated builder instance
- See Also:
-
name
Name of the constructor parameter.- Parameters:
name
- unique name of the parameter- Returns:
- updated builder instance
- See Also:
-
contract
Each dependency ia a specific contract. Each service provides one or more contracts for dependencies. For example forList<MyService>
, the contract isMyService
.- Parameters:
contract
- contract of the service we depend on- Returns:
- updated builder instance
- See Also:
-
contract
Each dependency ia a specific contract. Each service provides one or more contracts for dependencies. For example forList<MyService>
, the contract isMyService
.- Parameters:
consumer
- consumer of builder for contract of the service we depend on- Returns:
- updated builder instance
- See Also:
-
contract
Each dependency ia a specific contract. Each service provides one or more contracts for dependencies. For example forList<MyService>
, the contract isMyService
.- Parameters:
supplier
- supplier of contract of the service we depend on- Returns:
- updated builder instance
- See Also:
-
contractType
Generic type equivalent toDependencyBlueprint.contract()
. We need both, to prevent reflection at runtime.- Parameters:
contractType
- generic type of the dependency- Returns:
- updated builder instance
- See Also:
-
descriptor
Descriptor declaring this dependency. Descriptor is always public.- Parameters:
descriptor
- descriptor- Returns:
- updated builder instance
- See Also:
-
descriptor
Descriptor declaring this dependency. Descriptor is always public.- Parameters:
consumer
- consumer of builder for descriptor- Returns:
- updated builder instance
- See Also:
-
descriptor
Descriptor declaring this dependency. Descriptor is always public.- Parameters:
supplier
- supplier of descriptor- Returns:
- updated builder instance
- See Also:
-
descriptorConstant
Field name that declares this dependency in theDependencyBlueprint.descriptor()
. Can be used for code generation. This field is always a public constant.- Parameters:
descriptorConstant
- field that has the dependency on the descriptor type- Returns:
- updated builder instance
- See Also:
-
typeName
Type of the dependency (exact parameter type with all generics).- Parameters:
typeName
- type of the dependency asTypeName
- Returns:
- updated builder instance
- See Also:
-
typeName
Type of the dependency (exact parameter type with all generics).- Parameters:
consumer
- consumer of builder for type of the dependency asTypeName
- Returns:
- updated builder instance
- See Also:
-
typeName
Type of the dependency (exact parameter type with all generics).- Parameters:
supplier
- supplier of type of the dependency asTypeName
- Returns:
- updated builder instance
- See Also:
-
service
Type name of the service that uses this dependency.- Returns:
- the service
-
name
Name of the constructor parameter.- Returns:
- the name
-
contract
Each dependency ia a specific contract. Each service provides one or more contracts for dependencies. For example forList<MyService>
, the contract isMyService
.- Returns:
- the contract
-
contractType
Generic type equivalent toDependencyBlueprint.contract()
. We need both, to prevent reflection at runtime.- Returns:
- the contract type
-
descriptor
Descriptor declaring this dependency. Descriptor is always public.- Returns:
- the descriptor
-
descriptorConstant
Field name that declares this dependency in theDependencyBlueprint.descriptor()
. Can be used for code generation. This field is always a public constant.- Returns:
- the descriptor constant
-
typeName
Type of the dependency (exact parameter type with all generics).- Returns:
- the type name
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-