Class Dependency.Builder
java.lang.Object
io.helidon.service.registry.Dependency.BuilderBase<Dependency.Builder, Dependency>
io.helidon.service.registry.Dependency.Builder
- All Implemented Interfaces:
Prototype.Builder<Dependency.Builder, Dependency>, Builder<Dependency.Builder, Dependency>, Supplier<Dependency>
- Enclosing interface:
Dependency
public static class Dependency.Builder
extends Dependency.BuilderBase<Dependency.Builder, Dependency>
implements Builder<Dependency.Builder, Dependency>
Fluent API builder for
Dependency.-
Nested Class Summary
Nested classes/interfaces inherited from class Dependency.BuilderBase
Dependency.BuilderBase.DependencyImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class Dependency.BuilderBase
access, access, addAnnotation, addAnnotation, addAnnotations, addQualifier, addQualifier, addQualifiers, annotations, annotations, cardinality, cardinality, clearAnnotations, clearMethod, clearQualifiers, contract, contract, contract, contract, contractType, contractType, descriptor, descriptor, descriptor, descriptor, descriptorConstant, descriptorConstant, elementKind, elementKind, from, from, isServiceInstance, isServiceInstance, isSupplier, isSupplier, method, method, name, name, preBuildPrototype, qualifiers, qualifiers, service, service, service, service, toString, typeName, typeName, typeName, typeName, validatePrototypeModifier and TypeMethodDescriptionaccess()The access modifier on the injection point/receiver.access(AccessModifier access) The access modifier on the injection point/receiver.addAnnotation(Annotation annotation) The annotations on this element, excludingDependency.qualifiers().addAnnotation(Consumer<Annotation.Builder> consumer) The annotations on this element, excludingDependency.qualifiers().addAnnotations(Set<? extends Annotation> annotations) The annotations on this element, excludingDependency.qualifiers().addQualifier(Qualifier qualifier) The qualifier type annotations on this element.addQualifier(Consumer<Qualifier.Builder> consumer) The qualifier type annotations on this element.addQualifiers(Set<? extends Qualifier> qualifiers) The qualifier type annotations on this element.The annotations on this element, excludingDependency.qualifiers().annotations(Set<? extends Annotation> annotations) The annotations on this element, excludingDependency.qualifiers().Cardinality of this dependency.cardinality(DependencyCardinality cardinality) Cardinality of this dependency.Clear all annotations.Clear existing value of method.Clear all qualifiers.contract()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 toDependency.contract().contractType(GenericType<?> contractType) Generic type equivalent toDependency.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 theDependency.descriptor().descriptorConstant(String descriptorConstant) Field name that declares this dependency in theDependency.descriptor().Kind of element we inject into (constructor, field, method).elementKind(ElementKind elementKind) Kind of element we inject into (constructor, field, method).from(Dependency prototype) Update this builder from an existing prototype instance.from(Dependency.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleanWhether this dependency usesServiceInstance.isServiceInstance(boolean isServiceInstance) Whether this dependency usesServiceInstance.booleanWhether this dependency uses aSupplierinstead of a direct instance.isSupplier(boolean isSupplier) Whether this dependency uses aSupplierinstead of a direct instance.method()Top level method that declares this method.Top level method that declares this method.name()Name of the constructor parameter.Name of the constructor parameter.protected voidHandles providers and decorators.The qualifier type annotations on this element.qualifiers(Set<? extends Qualifier> qualifiers) The qualifier type annotations on this element.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 voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault Dependencyget()default Dependency.Builderidentity()Instance of this builder as the correct type.default Dependency.Builderupdate(Consumer<Dependency.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault Dependency.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<Dependency.Builder, Dependency>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<Dependency.Builder, Dependency>- Returns:
- instance of the built type
-