Class AbstractServiceInfoBasics.Builder<B extends AbstractServiceInfoBasics.Builder<B,T>,T extends ServiceInfoBasics>

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

public abstract static class AbstractServiceInfoBasics.Builder<B extends AbstractServiceInfoBasics.Builder<B,T>,T extends ServiceInfoBasics> extends Object implements ServiceInfoBasics, 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().
  • Constructor Details

    • Builder

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

    • serviceTypeName

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

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

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

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

      public Optional<Integer> declaredRunLevel()
      Description copied from interface: ServiceInfoBasics
      The optional RunLevel ascribed to the service.
      Specified by:
      declaredRunLevel in interface ServiceInfoBasics
      Returns:
      the service's run level
      See Also:
    • declaredWeight

      public Optional<Double> declaredWeight()
      Description copied from interface: ServiceInfoBasics
      Weight that was declared on the type itself.
      Specified by:
      declaredWeight in interface ServiceInfoBasics
      Returns:
      the declared weight
      See Also:
    • 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
    • addContractsImplemented

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

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

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

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

      public B declaredWeight(Double val)
      Setter for 'declaredWeight'.
      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.ServiceInfoBasics, 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