java.lang.Object
io.helidon.inject.api.ServiceInfoBasics.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.inject.api.ServiceInfo.BuilderBase<ServiceInfo.Builder,ServiceInfo>
io.helidon.inject.api.ServiceInfo.Builder
- All Implemented Interfaces:
Prototype.Api,Prototype.Builder<ServiceInfo.Builder,,ServiceInfo> Builder<ServiceInfo.Builder,,ServiceInfo> ServiceInfo,ServiceInfoBasics,Supplier<ServiceInfo>
- Enclosing interface:
ServiceInfo
public static class ServiceInfo.Builder
extends ServiceInfo.BuilderBase<ServiceInfo.Builder,ServiceInfo>
implements Builder<ServiceInfo.Builder,ServiceInfo>
Fluent API builder for
ServiceInfo.-
Nested Class Summary
Nested classes/interfaces inherited from class io.helidon.inject.api.ServiceInfo.BuilderBase
ServiceInfo.BuilderBase.ServiceInfoImplNested 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. -
Method Summary
Modifier and TypeMethodDescriptionbuild()The managed services advertised types (i.e., typically its interfaces).The optionalRunLevelascribed to the service.Weight that was declared on the type itself.default booleanmatches(ServiceInfoCriteria criteria) Determines whether this service info matches the criteria for injection.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.Methods inherited from class io.helidon.inject.api.ServiceInfo.BuilderBase
activatorTypeName, activatorTypeName, activatorTypeName, activatorTypeName, addExternalContractImplemented, addExternalContractImplemented, addExternalContractImplemented, addExternalContractsImplemented, addScopeTypeName, clearActivatorTypeName, clearModuleName, externalContractsImplemented, externalContractsImplemented, from, from, moduleName, moduleName, preBuildPrototype, toString, validatePrototypeMethods 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
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:
-
-
Method Details
-
buildPrototype
- Specified by:
buildPrototypein interfacePrototype.Builder<ServiceInfo.Builder,ServiceInfo>
-
build
- Specified by:
buildin interfaceBuilder<ServiceInfo.Builder,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:
-