Class AbstractInjectionPointInfo.Builder<B extends AbstractInjectionPointInfo.Builder<B,T>,T extends InjectionPointInfo>

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

public abstract static class AbstractInjectionPointInfo.Builder<B extends AbstractInjectionPointInfo.Builder<B,T>,T extends InjectionPointInfo> extends AbstractElementInfo.Builder<B,T> implements InjectionPointInfo
Fluent API builder for T.
  • Constructor Details

    • Builder

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

    • id

      public String id()
      Description copied from interface: InjectionPointInfo
      The identity (aka id) for this injection point. The id should be unique for the service type it is contained within.

      This method will return the InjectionPointInfo.baseIdentity() when ElementInfo.elementOffset() is null. If not null then the elemOffset is part of the returned identity.

      Specified by:
      id in interface InjectionPointInfo
      Returns:
      the unique identity
    • baseIdentity

      public String baseIdentity()
      Description copied from interface: InjectionPointInfo
      The base identifying name for this injection point. If the element represents a function, then the function arguments are encoded in its base identity.
      Specified by:
      baseIdentity in interface InjectionPointInfo
      Returns:
      the base identity of the element
    • listWrapped

      public boolean listWrapped()
      Description copied from interface: InjectionPointInfo
      True if the injection point is of type List.
      Specified by:
      listWrapped in interface InjectionPointInfo
      Returns:
      true if list based receiver
    • optionalWrapped

      public boolean optionalWrapped()
      Description copied from interface: InjectionPointInfo
      True if the injection point is of type Optional.
      Specified by:
      optionalWrapped in interface InjectionPointInfo
      Returns:
      true if optional based receiver
    • providerWrapped

      public boolean providerWrapped()
      Description copied from interface: InjectionPointInfo
      True if the injection point is of type Provider (or Supplier).
      Specified by:
      providerWrapped in interface InjectionPointInfo
      Returns:
      true if provider based receiver
    • dependencyToServiceInfo

      public ServiceInfoCriteria dependencyToServiceInfo()
      Description copied from interface: InjectionPointInfo
      The service info criteria/dependency this is dependent upon.
      Specified by:
      dependencyToServiceInfo in interface InjectionPointInfo
      Returns:
      the service info criteria we are dependent upon
    • id

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

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

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

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

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

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

      public B accept(T val)
      Description copied from class: AbstractElementInfo.Builder
      Accept and update from the provided value object.
      Overrides:
      accept in class AbstractElementInfo.Builder<B extends AbstractInjectionPointInfo.Builder<B,T>,T extends InjectionPointInfo>
      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)
      Description copied from class: AbstractElementInfo.Builder
      Visits all attributes of io.helidon.pico.api.ElementInfo, calling the AttributeVisitor for each.
      Overrides:
      visitAttributes in class AbstractElementInfo.Builder<B extends AbstractInjectionPointInfo.Builder<B,T>,T extends InjectionPointInfo>
      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