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>

protected static class Lookup.BuilderBase.LookupImpl extends Object implements Lookup
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • LookupImpl

      protected LookupImpl(Lookup.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • serviceType

      public Optional<TypeName> serviceType()
    • scopes

      public Set<TypeName> scopes()
    • qualifiers

      public Set<Qualifier> qualifiers()
    • contracts

      public Set<ResolvedType> contracts()
    • contractType

      public Optional<GenericType<?>> contractType()
    • runLevel

      public Optional<Double> runLevel()
    • weight

      public Optional<Double> weight()
    • includeAbstract

      public boolean includeAbstract()
    • dependency

      public Optional<Dependency> dependency()
    • factoryTypes

      public Set<FactoryType> factoryTypes()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • matches

      default boolean matches(Lookup criteria)
      Determines whether this lookup matches the criteria for injection. Matches is a looser form of equality check than equals(). 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

      default boolean matches(ServiceInfo serviceInfo)
      Determines whether this service info criteria matches the service descriptor. Matches is a looser form of equality check than equals(). 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

      default boolean matchesContracts(Lookup criteria)
      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

      default boolean matchesQualifiers(Set<Qualifier> qualifiers)
      Determines whether the provided qualifiers are matched by this lookup criteria.
      Parameters:
      qualifiers - qualifiers of a service
      Returns:
      whether this lookup matches those qualifiers