Class AbstractContextualServiceQuery.Builder<B extends AbstractContextualServiceQuery.Builder<B,T>,T extends ContextualServiceQuery>

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

public abstract static class AbstractContextualServiceQuery.Builder<B extends AbstractContextualServiceQuery.Builder<B,T>,T extends ContextualServiceQuery> extends Object implements ContextualServiceQuery, Builder<B,T>
Fluent API builder for T.
  • Constructor Details

    • Builder

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

    • serviceInfoCriteria

      public ServiceInfoCriteria serviceInfoCriteria()
      Description copied from interface: ContextualServiceQuery
      The criteria to use for the lookup into Services.
      Specified by:
      serviceInfoCriteria in interface ContextualServiceQuery
      Returns:
      the service info criteria
    • injectionPointInfo

      public Optional<InjectionPointInfo> injectionPointInfo()
      Description copied from interface: ContextualServiceQuery
      Optionally, the injection point context this search applies to.
      Specified by:
      injectionPointInfo in interface ContextualServiceQuery
      Returns:
      the optional injection point context info
    • expected

      public boolean expected()
      Description copied from interface: ContextualServiceQuery
      Set to true if there is an expectation that there is at least one match result from the search.
      Specified by:
      expected in interface ContextualServiceQuery
      Returns:
      true if it is expected there is at least a single match result
    • serviceInfoCriteria

      public B serviceInfoCriteria(ServiceInfoCriteria val)
      Setter for 'serviceInfoCriteria'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • injectionPointInfo

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

      public B injectionPointInfo(InjectionPointInfo val)
      Setter for 'injectionPointInfo'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • expected

      public B expected(boolean val)
      Setter for 'expected'.
      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.ContextualServiceQuery, 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