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

java.lang.Object
io.helidon.inject.api.ElementInfo.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.inject.api.InjectionPointInfo.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.Api, Prototype.Builder<BUILDER,PROTOTYPE>, ElementInfo, InjectionPointInfo
Direct Known Subclasses:
InjectionPointInfo.Builder
Enclosing interface:
InjectionPointInfo

public abstract static class InjectionPointInfo.BuilderBase<BUILDER extends InjectionPointInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionPointInfo> extends ElementInfo.BuilderBase<BUILDER,PROTOTYPE> implements Prototype.Builder<BUILDER,PROTOTYPE>, InjectionPointInfo
Fluent API builder base for InjectionPointInfo.
  • Field Details

  • Constructor Details

    • BuilderBase

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

    • from

      public BUILDER from(InjectionPointInfo 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(InjectionPointInfo.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
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and interceptors.
      Overrides:
      preBuildPrototype in class ElementInfo.BuilderBase<BUILDER extends InjectionPointInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionPointInfo>
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
      Overrides:
      validatePrototype in class ElementInfo.BuilderBase<BUILDER extends InjectionPointInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionPointInfo>
    • ipName

      public BUILDER ipName(String ipName)
      Name of the field or argument we are injecting into. Best effort, if cannot be found, an indexed approach may be used (such as arg0).
      Parameters:
      ipName - name of the injection point field or argument
      Returns:
      updated builder instance
      See Also:
    • ipType

      public BUILDER ipType(TypeName ipType)
      Type of the field or argument we are injecting into.
      Parameters:
      ipType - type of the field or argument, including generic type declarations
      Returns:
      updated builder instance
      See Also:
    • ipType

      public BUILDER ipType(Consumer<TypeName.Builder> consumer)
      Type of the field or argument we are injecting into.
      Parameters:
      consumer - consumer of builder for type of the field or argument, including generic type declarations
      Returns:
      updated builder instance
      See Also:
    • id

      public BUILDER id(String id)
      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 baseIdentity() when ElementInfo.BuilderBase.elementOffset() is null. If not null then the elemOffset is part of the returned identity.

      Parameters:
      id - the unique identity
      Returns:
      updated builder instance
      See Also:
    • baseIdentity

      public BUILDER baseIdentity(String baseIdentity)
      The base identifying name for this injection point. If the element represents a function, then the function arguments are encoded in its base identity.
      Parameters:
      baseIdentity - the base identity of the element
      Returns:
      updated builder instance
      See Also:
    • listWrapped

      public BUILDER listWrapped(boolean listWrapped)
      True if the injection point is of type List.
      Parameters:
      listWrapped - true if list based receiver
      Returns:
      updated builder instance
      See Also:
    • optionalWrapped

      public BUILDER optionalWrapped(boolean optionalWrapped)
      True if the injection point is of type Optional.
      Parameters:
      optionalWrapped - true if optional based receiver
      Returns:
      updated builder instance
      See Also:
    • providerWrapped

      public BUILDER providerWrapped(boolean providerWrapped)
      True if the injection point is of type Provider (or Supplier).
      Parameters:
      providerWrapped - true if provider based receiver
      Returns:
      updated builder instance
      See Also:
    • dependencyToServiceInfo

      public BUILDER dependencyToServiceInfo(ServiceInfoCriteria dependencyToServiceInfo)
      The service info criteria/dependency this is dependent upon.
      Parameters:
      dependencyToServiceInfo - the service info criteria we are dependent upon
      Returns:
      updated builder instance
      See Also:
    • dependencyToServiceInfo

      public BUILDER dependencyToServiceInfo(Consumer<ServiceInfoCriteria.Builder> consumer)
      The service info criteria/dependency this is dependent upon.
      Parameters:
      consumer - consumer of builder for the service info criteria we are dependent upon
      Returns:
      updated builder instance
      See Also:
    • ipName

      public String ipName()
      Name of the field or argument we are injecting into. Best effort, if cannot be found, an indexed approach may be used (such as arg0).
      Returns:
      the ip name
    • ipType

      public TypeName ipType()
      Type of the field or argument we are injecting into.
      Returns:
      the ip type
    • id

      public String id()
      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 baseIdentity() when ElementInfo.BuilderBase.elementOffset() is null. If not null then the elemOffset is part of the returned identity.

      Returns:
      the id
    • baseIdentity

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

      public boolean listWrapped()
      True if the injection point is of type List.
      Returns:
      the list wrapped
    • optionalWrapped

      public boolean optionalWrapped()
      True if the injection point is of type Optional.
      Returns:
      the optional wrapped
    • providerWrapped

      public boolean providerWrapped()
      True if the injection point is of type Provider (or Supplier).
      Returns:
      the provider wrapped
    • dependencyToServiceInfo

      public ServiceInfoCriteria dependencyToServiceInfo()
      The service info criteria/dependency this is dependent upon.
      Returns:
      the dependency to service info
    • toString

      public String toString()
      Overrides:
      toString in class ElementInfo.BuilderBase<BUILDER extends InjectionPointInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionPointInfo>
    • elementKind

      ElementKind elementKind()
      The injection point/receiver kind.
      Returns:
      the kind
    • access

      AccessModifier access()
      The access modifier on the injection point/receiver.
      Returns:
      the access
    • elementTypeName

      TypeName elementTypeName()
      The element type name (e.g., method type or field type).
      Returns:
      the target receiver type name
    • elementName

      String elementName()
      The element name (e.g., method name or field name).
      Returns:
      the target receiver name
    • elementOffset

      Optional<Integer> elementOffset()
      If the element is a method or constructor then this is the ordinal argument position of that argument.
      Returns:
      the offset argument, 0 based, or empty if field type
    • elementArgs

      Optional<Integer> elementArgs()
      If the element is a method or constructor then this is the total argument count for that method.
      Returns:
      total argument count
    • staticDeclaration

      boolean staticDeclaration()
      True if the injection point is static.
      Returns:
      true if static receiver
    • serviceTypeName

      TypeName serviceTypeName()
      The enclosing class name for the element.
      Returns:
      service type name
    • annotations

      Set<Annotation> annotations()
      The annotations on this element.
      Returns:
      the annotations on this element
    • qualifiers

      Set<Qualifier> qualifiers()
      The qualifier type annotations on this element.
      Returns:
      the qualifier type annotations on this element