Module io.helidon.inject.api
Package io.helidon.inject.api
Class ServiceInfo.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ServiceInfo>
java.lang.Object
io.helidon.inject.api.ServiceInfoBasics.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.inject.api.ServiceInfo.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.Api,Prototype.Builder<BUILDER,,PROTOTYPE> ServiceInfo,ServiceInfoBasics
- Direct Known Subclasses:
ServiceInfo.Builder
- Enclosing interface:
ServiceInfo
public abstract static class ServiceInfo.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ServiceInfo>
extends ServiceInfoBasics.BuilderBase<BUILDER,PROTOTYPE>
implements Prototype.Builder<BUILDER,PROTOTYPE>, ServiceInfo
Fluent API builder base for
ServiceInfo.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.inject.api.ServiceInfoBasics.BuilderBase
ServiceInfoBasics.BuilderBase.ServiceInfoBasicsImplNested classes/interfaces inherited from interface io.helidon.inject.api.ServiceInfo
ServiceInfo.Builder, ServiceInfo.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfo> Nested classes/interfaces inherited from interface io.helidon.inject.api.ServiceInfoBasics
ServiceInfoBasics.Builder, ServiceInfoBasics.BuilderBase<BUILDER extends ServiceInfoBasics.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfoBasics> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault weight for any internal Injection service component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.activatorTypeName(TypeName activatorTypeName) The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.activatorTypeName(Class<?> type) Activator type.activatorTypeName(Consumer<TypeName.Builder> consumer) The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.addExternalContractImplemented(TypeName externalContractImplemented) The managed services external contracts / interfaces.addExternalContractImplemented(Class<?> type) Add external contract implemented.The managed services external contracts / interfaces.addExternalContractsImplemented(Set<? extends TypeName> externalContractsImplemented) The managed services external contracts / interfaces.addScopeTypeName(Class<?> type) Add a scope type.Clear existing value of this property.Clear existing value of this property.The managed services advertised types (i.e., typically its interfaces).The optionalRunLevelascribed to the service.Weight that was declared on the type itself.The managed services external contracts / interfaces.externalContractsImplemented(Set<? extends TypeName> externalContractsImplemented) The managed services external contracts / interfaces.from(ServiceInfo prototype) Update this builder from an existing prototype instance.from(ServiceInfo.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.default booleanmatches(ServiceInfoCriteria criteria) Determines whether this service info matches the criteria for injection.The name of the ascribed module, if known.moduleName(String moduleName) The name of the ascribed module, if known.protected voidHandles providers and interceptors.The managed service assigned Qualifier's.default intThe realized run level will use the default run level if no run level was specified directly.default doubleThe realized weight will useWeighted.DEFAULT_WEIGHTif no weight was specified directly.The managed service assigned Scope's.The managed service implementationClass.toString()protected voidValidates required properties.Methods inherited from class io.helidon.inject.api.ServiceInfoBasics.BuilderBase
addContractImplemented, addContractImplemented, addContractImplemented, addContractsImplemented, addQualifier, addQualifier, addQualifiers, addScopeTypeName, addScopeTypeName, addScopeTypeNames, clearDeclaredRunLevel, clearDeclaredWeight, contractsImplemented, contractsImplemented, declaredRunLevel, declaredRunLevel, declaredWeight, declaredWeight, from, from, qualifiers, qualifiers, scopeTypeNames, scopeTypeNames, serviceTypeName, serviceTypeName, serviceTypeName, serviceTypeNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, resolveBuilder, self
-
Field Details
-
DEFAULT_INJECT_WEIGHT
static final double DEFAULT_INJECT_WEIGHTDefault weight for any internal Injection service component. It is defined to beWeighted.DEFAULT_WEIGHT- 1in order to allow any other service implementation to naturally have a higher weight (since it will use theDEFAULT_WEIGHTunless explicitly overridden.- See Also:
-
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance.- 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
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and interceptors.- Overrides:
preBuildPrototypein classServiceInfoBasics.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfo>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classServiceInfoBasics.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfo>
-
addExternalContractImplemented
Add external contract implemented.- Parameters:
type- type of the external contract- Returns:
- updated builder instance
-
activatorTypeName
Activator type.- Parameters:
type- type of the activator- Returns:
- updated builder instance
-
addScopeTypeName
Add a scope type.- Parameters:
type- type of the scope- Returns:
- updated builder instance
-
externalContractsImplemented
The managed services external contracts / interfaces. These should also be contained withinServiceInfoBasics.BuilderBase.contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.- Parameters:
externalContractsImplemented- the service external contracts implemented- Returns:
- updated builder instance
- See Also:
-
addExternalContractsImplemented
public BUILDER addExternalContractsImplemented(Set<? extends TypeName> externalContractsImplemented) The managed services external contracts / interfaces. These should also be contained withinServiceInfoBasics.BuilderBase.contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.- Parameters:
externalContractsImplemented- the service external contracts implemented- Returns:
- updated builder instance
- See Also:
-
addExternalContractImplemented
The managed services external contracts / interfaces. These should also be contained withinServiceInfoBasics.BuilderBase.contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.- Parameters:
externalContractImplemented- the service external contracts implemented- Returns:
- updated builder instance
- See Also:
-
addExternalContractImplemented
The managed services external contracts / interfaces. These should also be contained withinServiceInfoBasics.BuilderBase.contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.- Parameters:
consumer- the service external contracts implemented- Returns:
- updated builder instance
- See Also:
-
clearActivatorTypeName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
activatorTypeName
The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.- Parameters:
activatorTypeName- the activator type name- Returns:
- updated builder instance
- See Also:
-
activatorTypeName
The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.- Parameters:
consumer- the activator type name- Returns:
- updated builder instance
- See Also:
-
clearModuleName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
moduleName
The name of the ascribed module, if known.- Parameters:
moduleName- the module name- Returns:
- updated builder instance
- See Also:
-
externalContractsImplemented
The managed services external contracts / interfaces. These should also be contained withinServiceInfoBasics.BuilderBase.contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.- Returns:
- the external contracts implemented
-
activatorTypeName
The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.- Returns:
- the activator type name
-
moduleName
The name of the ascribed module, if known.- Returns:
- the module name
-
toString
- Overrides:
toStringin classServiceInfoBasics.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfo>
-
matches
Determines whether this service info matches the criteria for injection. Matches is a looser form of equality check thanequals(). If a service matches criteria it is generally assumed to be viable for assignability.- Parameters:
criteria- the criteria to compare against- Returns:
- true if the criteria provided matches this instance
-
serviceTypeName
TypeName serviceTypeName()The managed service implementationClass.- Returns:
- the service type name
-
scopeTypeNames
The managed service assigned Scope's.- Returns:
- the service scope type name
-
qualifiers
The managed service assigned Qualifier's.- Returns:
- the service qualifiers
-
contractsImplemented
The managed services advertised types (i.e., typically its interfaces).- Returns:
- the service contracts implemented
- See Also:
-
declaredRunLevel
The optionalRunLevelascribed to the service.- Returns:
- the service's run level
- See Also:
-
realizedRunLevel
default int realizedRunLevel()The realized run level will use the default run level if no run level was specified directly.- Returns:
- the realized run level
- See Also:
-
declaredWeight
Weight that was declared on the type itself.- Returns:
- the declared weight
- See Also:
-
realizedWeight
default double realizedWeight()The realized weight will useWeighted.DEFAULT_WEIGHTif no weight was specified directly.- Returns:
- the realized weight
- See Also:
-