Class Lookup.Builder
java.lang.Object
io.helidon.service.registry.Lookup.BuilderBase<Lookup.Builder, Lookup>
io.helidon.service.registry.Lookup.Builder
- All Implemented Interfaces:
Prototype.Builder<Lookup.Builder, Lookup>, Builder<Lookup.Builder, Lookup>, Supplier<Lookup>
- Enclosing interface:
Lookup
public static class Lookup.Builder
extends Lookup.BuilderBase<Lookup.Builder, Lookup>
implements Builder<Lookup.Builder, Lookup>
Fluent API builder for
Lookup.-
Nested Class Summary
Nested classes/interfaces inherited from class Lookup.BuilderBase
Lookup.BuilderBase.LookupImplModifier 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 Lookup.BuilderBase
addContract, addContract, addContract, addContracts, addFactoryType, addFactoryTypes, addQualifier, addQualifier, addQualifiers, addScope, addScope, addScopes, clearContracts, clearContractType, clearDependency, clearFactoryTypes, clearQualifiers, clearRunLevel, clearScopes, clearServiceType, clearWeight, contracts, contracts, contractType, contractType, dependency, dependency, dependency, dependency, factoryTypes, factoryTypes, from, from, includeAbstract, includeAbstract, named, named, preBuildPrototype, qualifiers, qualifiers, runLevel, runLevel, scopes, scopes, serviceType, serviceType, serviceType, serviceType, serviceType, toString, validatePrototype, weight, weightModifier and TypeMethodDescriptionaddContract(ResolvedType contract) The managed services advertised types (i.e., typically its interfaces, can be throughService.ExternalContracts).addContract(TypeName contract) The managed services advertised types (i.e., typically its interfaces).addContract(Class<?> contract) The managed services advertised types (i.e., typically its interfaces).addContracts(Set<? extends ResolvedType> contracts) The managed services advertised types (i.e., typically its interfaces, can be throughService.ExternalContracts).addFactoryType(FactoryType factoryType) If configured, the lookup will return service factories of the chosen types.addFactoryTypes(Set<? extends FactoryType> factoryTypes) If configured, the lookup will return service factories of the chosen types.addQualifier(Qualifier qualifier) The managed service assigned Qualifier's.addQualifier(Consumer<Qualifier.Builder> consumer) The managed service assigned Qualifier's.addQualifiers(Set<? extends Qualifier> qualifiers) The managed service assigned Qualifier's.The managed service assigned Scope.addScope(Consumer<TypeName.Builder> consumer) The managed service assigned Scope.The managed service assigned Scope.Clear all contracts.Clear existing value of contractType.Clear existing value of dependency.Clear all factoryTypes.Clear all qualifiers.Clear existing value of runLevel.Clear all scopes.Clear existing value of serviceType.Clear existing value of weight.The managed services advertised types (i.e., typically its interfaces, can be throughService.ExternalContracts).contracts(Set<? extends ResolvedType> contracts) The managed services advertised types (i.e., typically its interfaces, can be throughService.ExternalContracts).Optional<GenericType<?>> A singleGenericTypecan be defined if the lookup should also honorService.QualifiedFactoryservices that can handle any type.contractType(GenericType<?> contractType) A singleGenericTypecan be defined if the lookup should also honorService.QualifiedFactoryservices that can handle any type.Optionally, the injection point search applies to.dependency(Dependency dependency) Optionally, the injection point search applies to.dependency(Consumer<Dependency.Builder> consumer) Optionally, the injection point search applies to.dependency(Supplier<? extends Dependency> supplier) Optionally, the injection point search applies to.If configured, the lookup will return service factories of the chosen types.factoryTypes(Set<? extends FactoryType> factoryTypes) If configured, the lookup will return service factories of the chosen types.Update this builder from an existing prototype instance.from(Lookup.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleanWhether to include abstract type service descriptors.includeAbstract(boolean includeAbstract) Whether to include abstract type service descriptors.Only lookup services with the provided named qualifier, where name is the fully qualified name of the class.Only lookup services with the provided named qualifier.protected voidHandles providers and decorators.The managed service assigned Qualifier's.qualifiers(Set<? extends Qualifier> qualifiers) The managed service assigned Qualifier's.runLevel()The optionalService.RunLevelascribed to the service.runLevel(double runLevel) The optionalService.RunLevelascribed to the service.scopes()The managed service assigned Scope.The managed service assigned Scope.The managed service implementation type name.serviceType(TypeName serviceType) The managed service implementation type name.serviceType(Class<?> contract) The managed service implementation type.serviceType(Consumer<TypeName.Builder> consumer) The managed service implementation type name.serviceType(Supplier<? extends TypeName> supplier) The managed service implementation type name.toString()protected voidValidates required properties.weight()Weight that was declared on the type itself.weight(double weight) Weight that was declared on the type itself.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault Lookupget()default Lookup.Builderidentity()Instance of this builder as the correct type.default Lookup.Builderupdate(Consumer<Lookup.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault Lookup.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<Lookup.Builder, Lookup>- 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<Lookup.Builder, Lookup>- Returns:
- instance of the built type
-