Class ServiceInfoCriteria.BuilderBase<BUILDER extends ServiceInfoCriteria.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ServiceInfoCriteria>

java.lang.Object
io.helidon.inject.api.ServiceInfoCriteria.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
ServiceInfoCriteria.Builder
Enclosing interface:
ServiceInfoCriteria

public abstract static class ServiceInfoCriteria.BuilderBase<BUILDER extends ServiceInfoCriteria.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ServiceInfoCriteria> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for ServiceInfoCriteria.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(ServiceInfoCriteria prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(ServiceInfoCriteria.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • addContractImplemented

      public BUILDER addContractImplemented(Class<?> contract)
      The managed services advertised types (i.e., typically its interfaces).
      Parameters:
      contract - the service contracts implemented
      Returns:
      updated builder instance
      See Also:
    • clearServiceTypeName

      public BUILDER clearServiceTypeName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

      public BUILDER serviceTypeName(TypeName serviceTypeName)
      The managed service implementation type name.
      Parameters:
      serviceTypeName - the service type name
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

      public BUILDER serviceTypeName(Consumer<TypeName.Builder> consumer)
      The managed service implementation type name.
      Parameters:
      consumer - the service type name
      Returns:
      updated builder instance
      See Also:
    • scopeTypeNames

      public BUILDER scopeTypeNames(Set<? extends TypeName> scopeTypeNames)
      The managed service assigned Scope's.
      Parameters:
      scopeTypeNames - the service scope type name
      Returns:
      updated builder instance
      See Also:
    • addScopeTypeNames

      public BUILDER addScopeTypeNames(Set<? extends TypeName> scopeTypeNames)
      The managed service assigned Scope's.
      Parameters:
      scopeTypeNames - the service scope type name
      Returns:
      updated builder instance
      See Also:
    • addScopeTypeName

      public BUILDER addScopeTypeName(TypeName scopeTypeName)
      The managed service assigned Scope's.
      Parameters:
      scopeTypeName - the service scope type name
      Returns:
      updated builder instance
      See Also:
    • addScopeTypeName

      public BUILDER addScopeTypeName(Consumer<TypeName.Builder> consumer)
      The managed service assigned Scope's.
      Parameters:
      consumer - the service scope type name
      Returns:
      updated builder instance
      See Also:
    • qualifiers

      public BUILDER qualifiers(Set<? extends Qualifier> qualifiers)
      The managed service assigned Qualifier's.
      Parameters:
      qualifiers - the service qualifiers
      Returns:
      updated builder instance
      See Also:
    • addQualifiers

      public BUILDER addQualifiers(Set<? extends Qualifier> qualifiers)
      The managed service assigned Qualifier's.
      Parameters:
      qualifiers - the service qualifiers
      Returns:
      updated builder instance
      See Also:
    • addQualifier

      public BUILDER addQualifier(Qualifier qualifier)
      The managed service assigned Qualifier's.
      Parameters:
      qualifier - the service qualifiers
      Returns:
      updated builder instance
      See Also:
    • addQualifier

      public BUILDER addQualifier(Consumer<Qualifier.Builder> consumer)
      The managed service assigned Qualifier's.
      Parameters:
      consumer - the service qualifiers
      Returns:
      updated builder instance
      See Also:
    • contractsImplemented

      public BUILDER contractsImplemented(Set<? extends TypeName> contractsImplemented)
      The managed services advertised types (i.e., typically its interfaces).
      Parameters:
      contractsImplemented - the service contracts implemented
      Returns:
      updated builder instance
      See Also:
    • addContractsImplemented

      public BUILDER addContractsImplemented(Set<? extends TypeName> contractsImplemented)
      The managed services advertised types (i.e., typically its interfaces).
      Parameters:
      contractsImplemented - the service contracts implemented
      Returns:
      updated builder instance
      See Also:
    • addContractImplemented

      public BUILDER addContractImplemented(TypeName contractImplemented)
      The managed services advertised types (i.e., typically its interfaces).
      Parameters:
      contractImplemented - the service contracts implemented
      Returns:
      updated builder instance
      See Also:
    • addContractImplemented

      public BUILDER addContractImplemented(Consumer<TypeName.Builder> consumer)
      The managed services advertised types (i.e., typically its interfaces).
      Parameters:
      consumer - the service contracts implemented
      Returns:
      updated builder instance
      See Also:
    • clearRunLevel

      public BUILDER clearRunLevel()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • runLevel

      public BUILDER runLevel(int runLevel)
      The optional RunLevel ascribed to the service.
      Parameters:
      runLevel - the service's run level
      Returns:
      updated builder instance
      See Also:
    • clearWeight

      public BUILDER clearWeight()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • weight

      public BUILDER weight(double weight)
      Weight that was declared on the type itself.
      Parameters:
      weight - the declared weight
      Returns:
      updated builder instance
      See Also:
    • externalContractsImplemented

      public BUILDER externalContractsImplemented(Set<? extends TypeName> externalContractsImplemented)
      The managed services external contracts / interfaces. These should also be contained within contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.
      Parameters:
      externalContractsImplemented - the service external contracts implemented
      Returns:
      updated builder instance
      See Also:
    • addExternalContractsImplemented

      public BUILDER addExternalContractsImplemented(Set<? extends TypeName> externalContractsImplemented)
      The managed services external contracts / interfaces. These should also be contained within contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.
      Parameters:
      externalContractsImplemented - the service external contracts implemented
      Returns:
      updated builder instance
      See Also:
    • addExternalContractImplemented

      public BUILDER addExternalContractImplemented(TypeName externalContractImplemented)
      The managed services external contracts / interfaces. These should also be contained within contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.
      Parameters:
      externalContractImplemented - the service external contracts implemented
      Returns:
      updated builder instance
      See Also:
    • addExternalContractImplemented

      public BUILDER addExternalContractImplemented(Consumer<TypeName.Builder> consumer)
      The managed services external contracts / interfaces. These should also be contained within contractsImplemented(). External contracts are from other modules other than the module containing the implementation typically.
      Parameters:
      consumer - the service external contracts implemented
      Returns:
      updated builder instance
      See Also:
    • clearActivatorTypeName

      public BUILDER clearActivatorTypeName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • activatorTypeName

      public BUILDER activatorTypeName(TypeName activatorTypeName)
      The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.
      Parameters:
      activatorTypeName - the activator type name
      Returns:
      updated builder instance
      See Also:
    • activatorTypeName

      public BUILDER activatorTypeName(Consumer<TypeName.Builder> consumer)
      The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.
      Parameters:
      consumer - the activator type name
      Returns:
      updated builder instance
      See Also:
    • clearModuleName

      public BUILDER clearModuleName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • moduleName

      public BUILDER moduleName(String moduleName)
      The name of the ascribed module, if known.
      Parameters:
      moduleName - the module name
      Returns:
      updated builder instance
      See Also:
    • includeIntercepted

      public BUILDER includeIntercepted(boolean includeIntercepted)
      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.
      Parameters:
      includeIntercepted - true if the non-proxied type intercepted services should be eligible
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

      public Optional<TypeName> serviceTypeName()
      The managed service implementation type name.
      Returns:
      the service type name
    • scopeTypeNames

      public Set<TypeName> scopeTypeNames()
      The managed service assigned Scope's.
      Returns:
      the scope type names
    • qualifiers

      public Set<Qualifier> qualifiers()
      The managed service assigned Qualifier's.
      Returns:
      the qualifiers
    • contractsImplemented

      public Set<TypeName> contractsImplemented()
      The managed services advertised types (i.e., typically its interfaces).
      Returns:
      the contracts implemented
      See Also:
    • runLevel

      public Optional<Integer> runLevel()
      The optional RunLevel ascribed to the service.
      Returns:
      the run level
    • weight

      public Optional<Double> weight()
      Weight that was declared on the type itself.
      Returns:
      the weight
    • externalContractsImplemented

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

      public Optional<TypeName> activatorTypeName()
      The management agent (i.e., the activator) that is responsible for creating and activating - typically build-time created.
      Returns:
      the activator type name
    • moduleName

      public Optional<String> moduleName()
      The name of the ascribed module, if known.
      Returns:
      the module name
    • includeIntercepted

      public boolean includeIntercepted()
      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.
      Returns:
      the include intercepted
    • toString

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

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.