Class AbstractServiceInfoCriteria.Builder<B extends AbstractServiceInfoCriteria.Builder<B,T>,T extends ServiceInfoCriteria>

java.lang.Object
io.helidon.pico.api.AbstractServiceInfoCriteria.Builder<B,T>
Type Parameters:
B - the type of the builder
T - the type of the built instance
All Implemented Interfaces:
Builder<B,T>, ServiceInfoCriteria, Supplier<T>
Direct Known Subclasses:
DefaultServiceInfoCriteria.Builder
Enclosing class:
AbstractServiceInfoCriteria

public abstract static class AbstractServiceInfoCriteria.Builder<B extends AbstractServiceInfoCriteria.Builder<B,T>,T extends ServiceInfoCriteria> extends Object implements ServiceInfoCriteria, Builder<B,T>
Fluent API builder for T.
  • Field Details

    • scopeTypeNames

      protected final Set scopeTypeNames
      Field value for java.util.Set<java.lang.String> scopeTypeNames().
    • qualifiers

      protected final Set qualifiers
      Field value for java.util.Set<io.helidon.pico.api.QualifierAndValue> qualifiers().
    • contractsImplemented

      protected final Set contractsImplemented
      Field value for java.util.Set<java.lang.String> contractsImplemented().
    • externalContractsImplemented

      protected final Set externalContractsImplemented
      Field value for java.util.Set<java.lang.String> externalContractsImplemented().
  • Constructor Details

    • Builder

      protected Builder()
      Fluent API builder constructor.
  • Method Details

    • serviceTypeName

      public Optional<String> serviceTypeName()
      Description copied from interface: ServiceInfoCriteria
      The managed service implementation type name.
      Specified by:
      serviceTypeName in interface ServiceInfoCriteria
      Returns:
      the service type name
    • scopeTypeNames

      public Set<String> scopeTypeNames()
      Description copied from interface: ServiceInfoCriteria
      The managed service assigned Scope's.
      Specified by:
      scopeTypeNames in interface ServiceInfoCriteria
      Returns:
      the service scope type name
    • qualifiers

      public Set<QualifierAndValue> qualifiers()
      Description copied from interface: ServiceInfoCriteria
      The managed service assigned Qualifier's.
      Specified by:
      qualifiers in interface ServiceInfoCriteria
      Returns:
      the service qualifiers
    • contractsImplemented

      public Set<String> contractsImplemented()
      Description copied from interface: ServiceInfoCriteria
      The managed services advertised types (i.e., typically its interfaces).
      Specified by:
      contractsImplemented in interface ServiceInfoCriteria
      Returns:
      the service contracts implemented
      See Also:
    • runLevel

      public Optional<Integer> runLevel()
      Description copied from interface: ServiceInfoCriteria
      The optional RunLevel ascribed to the service.
      Specified by:
      runLevel in interface ServiceInfoCriteria
      Returns:
      the service's run level
    • weight

      public Optional<Double> weight()
      Description copied from interface: ServiceInfoCriteria
      Weight that was declared on the type itself.
      Specified by:
      weight in interface ServiceInfoCriteria
      Returns:
      the declared weight
    • externalContractsImplemented

      public Set<String> externalContractsImplemented()
      Description copied from interface: ServiceInfoCriteria
      The managed services external contracts / interfaces. These should also be contained within ServiceInfoCriteria.contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.
      Specified by:
      externalContractsImplemented in interface ServiceInfoCriteria
      Returns:
      the service external contracts implemented
      See Also:
    • activatorTypeName

      public Optional<String> activatorTypeName()
      Description copied from interface: ServiceInfoCriteria
      The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.
      Specified by:
      activatorTypeName in interface ServiceInfoCriteria
      Returns:
      the activator type name
    • moduleName

      public Optional<String> moduleName()
      Description copied from interface: ServiceInfoCriteria
      The name of the ascribed module, if known.
      Specified by:
      moduleName in interface ServiceInfoCriteria
      Returns:
      the module name
    • includeIntercepted

      public boolean includeIntercepted()
      Description copied from interface: ServiceInfoCriteria
      Determines whether the non-proxied, Intercepted services should be returned in any lookup operation. If this option is disabled then only the Interceptor-generated service will be eligible to be returned and not the service being intercepted. The default value is false.
      Specified by:
      includeIntercepted in interface ServiceInfoCriteria
      Returns:
      true if the non-proxied type intercepted services should be eligible
    • serviceTypeName

      public B serviceTypeName(Optional<String> val)
      Setter for 'serviceTypeName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • serviceTypeName

      public B serviceTypeName(String val)
      Setter for 'serviceTypeName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • scopeTypeNames

      public B scopeTypeNames(Collection<String> val)
      Setter for 'scopeTypeNames'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addScopeTypeNames

      public B addScopeTypeNames(Collection<String> val)
      Setter for 'scopeTypeNames'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addScopeTypeName

      public B addScopeTypeName(String val)
      Setter for 'scopeTypeNames'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • qualifiers

      public B qualifiers(Collection<QualifierAndValue> val)
      Setter for 'qualifiers'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addQualifiers

      public B addQualifiers(Collection<QualifierAndValue> val)
      Setter for 'qualifiers'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addQualifier

      public B addQualifier(QualifierAndValue val)
      Setter for 'qualifiers'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • contractsImplemented

      public B contractsImplemented(Collection<String> val)
      Setter for 'contractsImplemented'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addContractsImplemented

      public B addContractsImplemented(Collection<String> val)
      Setter for 'contractsImplemented'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addContractImplemented

      public B addContractImplemented(String val)
      Setter for 'contractsImplemented'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • runLevel

      public B runLevel(Optional<Integer> val)
      Setter for 'runLevel'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • runLevel

      public B runLevel(Integer val)
      Setter for 'runLevel'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • weight

      public B weight(Optional<Double> val)
      Setter for 'weight'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • weight

      public B weight(Double val)
      Setter for 'weight'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • externalContractsImplemented

      public B externalContractsImplemented(Collection<String> val)
      Setter for 'externalContractsImplemented'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addExternalContractsImplemented

      public B addExternalContractsImplemented(Collection<String> val)
      Setter for 'externalContractsImplemented'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addExternalContractImplemented

      public B addExternalContractImplemented(String val)
      Setter for 'externalContractsImplemented'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • activatorTypeName

      public B activatorTypeName(Optional<String> val)
      Setter for 'activatorTypeName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • activatorTypeName

      public B activatorTypeName(String val)
      Setter for 'activatorTypeName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • moduleName

      public B moduleName(Optional<String> val)
      Setter for 'moduleName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • moduleName

      public B moduleName(String val)
      Setter for 'moduleName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • includeIntercepted

      public B includeIntercepted(boolean val)
      Setter for 'includeIntercepted'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • accept

      public B accept(T val)
      Accept and update from the provided value object.
      Parameters:
      val - the value object to copy from
      Returns:
      this instance typed to correct type
    • visitAttributes

      public <T> void visitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx)
      Visits all attributes of io.helidon.pico.api.ServiceInfoCriteria, calling the AttributeVisitor for each.
      Type Parameters:
      T - type of the user defined context
      Parameters:
      visitor - the visitor called for each attribute
      userDefinedCtx - any object you wish to pass to each visit call