Class AbstractElementInfo.Builder<B extends AbstractElementInfo.Builder<B,T>,T extends ElementInfo>

java.lang.Object
io.helidon.pico.api.AbstractElementInfo.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, Supplier<T>
Direct Known Subclasses:
AbstractInjectionPointInfo.Builder, DefaultElementInfo.Builder
Enclosing class:
AbstractElementInfo

public abstract static class AbstractElementInfo.Builder<B extends AbstractElementInfo.Builder<B,T>,T extends ElementInfo> extends Object implements ElementInfo, Builder<B,T>
Fluent API builder for T.
  • Field Details

    • annotations

      protected final Set annotations
      Field value for java.util.Set<io.helidon.common.types.AnnotationAndValue> annotations().
    • qualifiers

      protected final Set qualifiers
      Field value for java.util.Set<io.helidon.pico.api.QualifierAndValue> qualifiers().
  • Constructor Details

    • Builder

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

    • elementKind

      public ElementInfo.ElementKind elementKind()
      Description copied from interface: ElementInfo
      The injection point/receiver kind.
      Specified by:
      elementKind in interface ElementInfo
      Returns:
      the kind
    • access

      public ElementInfo.Access access()
      Description copied from interface: ElementInfo
      The access modifier on the injection point/receiver.
      Specified by:
      access in interface ElementInfo
      Returns:
      the access
    • elementTypeName

      public String elementTypeName()
      Description copied from interface: ElementInfo
      The element type name (e.g., method type or field type).
      Specified by:
      elementTypeName in interface ElementInfo
      Returns:
      the target receiver type name
    • elementName

      public String elementName()
      Description copied from interface: ElementInfo
      The element name (e.g., method name or field name).
      Specified by:
      elementName in interface ElementInfo
      Returns:
      the target receiver name
    • elementOffset

      public Optional<Integer> elementOffset()
      Description copied from interface: ElementInfo
      If the element is a method or constructor then this is the ordinal argument position of that argument.
      Specified by:
      elementOffset in interface ElementInfo
      Returns:
      the offset argument, 0 based, or empty if field type
    • elementArgs

      public Optional<Integer> elementArgs()
      Description copied from interface: ElementInfo
      If the element is a method or constructor then this is the total argument count for that method.
      Specified by:
      elementArgs in interface ElementInfo
      Returns:
      total argument count
    • staticDeclaration

      public boolean staticDeclaration()
      Description copied from interface: ElementInfo
      True if the injection point is static.
      Specified by:
      staticDeclaration in interface ElementInfo
      Returns:
      true if static receiver
    • serviceTypeName

      public String serviceTypeName()
      Description copied from interface: ElementInfo
      The enclosing class name for the element.
      Specified by:
      serviceTypeName in interface ElementInfo
      Returns:
      service type name
    • annotations

      public Set<AnnotationAndValue> annotations()
      Description copied from interface: ElementInfo
      The annotations on this element.
      Specified by:
      annotations in interface ElementInfo
      Returns:
      the annotations on this element
    • qualifiers

      public Set<QualifierAndValue> qualifiers()
      Description copied from interface: ElementInfo
      The qualifier type annotations on this element.
      Specified by:
      qualifiers in interface ElementInfo
      Returns:
      the qualifier type annotations on this element
    • elementKind

      public B elementKind(ElementInfo.ElementKind val)
      Setter for 'elementKind'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • access

      public B access(ElementInfo.Access val)
      Setter for 'access'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • elementTypeName

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

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

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

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

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

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

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

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

      public B annotations(Collection<AnnotationAndValue> val)
      Setter for 'annotations'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addAnnotations

      public B addAnnotations(Collection<AnnotationAndValue> val)
      Setter for 'annotations'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addAnnotation

      public B addAnnotation(AnnotationAndValue val)
      Setter for 'annotations'.
      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
    • 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.ElementInfo, 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