Module io.helidon.service.registry
Package io.helidon.service.registry
Class Lookup.BuilderBase.LookupImpl
java.lang.Object
io.helidon.service.registry.Lookup.BuilderBase.LookupImpl
- All Implemented Interfaces:
Prototype.Api,Lookup
- Enclosing class:
Lookup.BuilderBase<BUILDER extends Lookup.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Lookup>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.service.registry.Lookup
Lookup.Builder, Lookup.BuilderBase<BUILDER extends Lookup.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Lookup> -
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLookupImpl(Lookup.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionThe 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.Optionally, the injection point search applies to.booleanIf configured, the lookup will return service factories of the chosen types.inthashCode()booleanWhether to include abstract type service descriptors.default booleanDetermines whether this lookup matches the criteria for injection.default booleanmatches(ServiceInfo serviceInfo) Determines whether this service info criteria matches the service descriptor.default booleanmatchesContracts(Lookup criteria) Determines whether the provided criteria match just the contracts portion of the provided criteria.default booleanmatchesQualifiers(Set<Qualifier> qualifiers) Determines whether the provided qualifiers are matched by this lookup criteria.The managed service assigned Qualifier's.runLevel()The optionalService.RunLevelascribed to the service.scopes()The managed service assigned Scope.The managed service implementation type name.toString()weight()Weight that was declared on the type itself.
-
Constructor Details
-
LookupImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
serviceType
Description copied from interface:LookupThe managed service implementation type name.- Specified by:
serviceTypein interfaceLookup- Returns:
- the service type name
-
scopes
Description copied from interface:LookupThe managed service assigned Scope. If empty, any scope is matched. If more than one value, any service in one of these scopes is matched. -
qualifiers
Description copied from interface:LookupThe managed service assigned Qualifier's.- Specified by:
qualifiersin interfaceLookup- Returns:
- the service qualifiers
-
contracts
Description copied from interface:LookupThe managed services advertised types (i.e., typically its interfaces, can be throughService.ExternalContracts). -
contractType
Description copied from interface:LookupA singleGenericTypecan be defined if the lookup should also honorService.QualifiedFactoryservices that can handle any type. This would be the target type to convert to. If not specified, Object will be used.- Specified by:
contractTypein interfaceLookup- Returns:
- generic type of the contract, if only one contract is desired
-
runLevel
Description copied from interface:LookupThe optionalService.RunLevelascribed to the service. -
weight
Description copied from interface:LookupWeight that was declared on the type itself. -
includeAbstract
public boolean includeAbstract()Description copied from interface:LookupWhether to include abstract type service descriptors.- Specified by:
includeAbstractin interfaceLookup- Returns:
- whether to include abstract classes and interfaces
-
dependency
Description copied from interface:LookupOptionally, the injection point search applies to. There are some service factories (such asService.InjectionPointFactory) that provide instances for a specific injection point. Such factories may require an injection point to be present, and may fail otherwise.Injection points of each service are generated as public constants on their respective service descriptors.
- Specified by:
dependencyin interfaceLookup- Returns:
- the optional injection point context info
-
factoryTypes
Description copied from interface:LookupIf configured, the lookup will return service factories of the chosen types. If no factory types are defined, service instances are returned.Otherwise only service factories of the chosen types are returned, as follows:
FactoryType.SERVICE- only services that directly implement the contractFactoryType.SUPPLIER- only that areSupplierof the contractFactoryType.QUALIFIED- services that areService.QualifiedFactoryof the contractFactoryType.SERVICES- services that areService.ServicesFactoryof the contractFactoryType.INJECTION_POINT- services that areService.InjectionPointFactoryof the contractFactoryType.NONE- this has no effect and will not modify the lookup
- Specified by:
factoryTypesin interfaceLookup- Returns:
- desired factory types
-
toString
-
equals
-
hashCode
public int hashCode() -
matches
Determines whether this lookup 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
-
matches
Determines whether this service info criteria matches the service descriptor. Matches is a looser form of equality check thanequals(). If a service matches criteria it is generally assumed to be viable for assignability.- Parameters:
serviceInfo- to compare with- Returns:
- true if this criteria matches the service descriptor
-
matchesContracts
Determines whether the provided criteria match just the contracts portion of the provided criteria. Note that it is expected any external contracts have been consolidated into the regular contract section.- Parameters:
criteria- the criteria to compare against- Returns:
- true if the criteria provided matches this instance from only the contracts point of view
-
matchesQualifiers
Determines whether the provided qualifiers are matched by this lookup criteria.- Parameters:
qualifiers- qualifiers of a service- Returns:
- whether this lookup matches those qualifiers
-