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

java.lang.Object
io.helidon.inject.api.ElementInfo.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:
ElementInfo.Builder, InjectionPointInfo.BuilderBase
Enclosing interface:
ElementInfo

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

    • BuilderBase

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

    • from

      public BUILDER from(ElementInfo 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(ElementInfo.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
    • elementKind

      public BUILDER elementKind(ElementKind elementKind)
      The injection point/receiver kind.
      Parameters:
      elementKind - the kind
      Returns:
      updated builder instance
      See Also:
    • access

      public BUILDER access(AccessModifier access)
      The access modifier on the injection point/receiver.
      Parameters:
      access - the access
      Returns:
      updated builder instance
      See Also:
    • elementTypeName

      public BUILDER elementTypeName(TypeName elementTypeName)
      The element type name (e.g., method type or field type).
      Parameters:
      elementTypeName - the target receiver type name
      Returns:
      updated builder instance
      See Also:
    • elementTypeName

      public BUILDER elementTypeName(Consumer<TypeName.Builder> consumer)
      The element type name (e.g., method type or field type).
      Parameters:
      consumer - consumer of builder for the target receiver type name
      Returns:
      updated builder instance
      See Also:
    • elementTypeName

      public BUILDER elementTypeName(Supplier<? extends TypeName> supplier)
      The element type name (e.g., method type or field type).
      Parameters:
      supplier - supplier of the target receiver type name
      Returns:
      updated builder instance
      See Also:
    • elementName

      public BUILDER elementName(String elementName)
      The element name (e.g., method name or field name).
      Parameters:
      elementName - the target receiver name
      Returns:
      updated builder instance
      See Also:
    • clearElementOffset

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

      public BUILDER elementOffset(int elementOffset)
      If the element is a method or constructor then this is the ordinal argument position of that argument.
      Parameters:
      elementOffset - the offset argument, 0 based, or empty if field type
      Returns:
      updated builder instance
      See Also:
    • clearElementArgs

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

      public BUILDER elementArgs(int elementArgs)
      If the element is a method or constructor then this is the total argument count for that method.
      Parameters:
      elementArgs - total argument count
      Returns:
      updated builder instance
      See Also:
    • staticDeclaration

      public BUILDER staticDeclaration(boolean staticDeclaration)
      True if the injection point is static.
      Parameters:
      staticDeclaration - true if static receiver
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

      public BUILDER serviceTypeName(TypeName serviceTypeName)
      The enclosing class name for the element.
      Parameters:
      serviceTypeName - service type name
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

      public BUILDER serviceTypeName(Consumer<TypeName.Builder> consumer)
      The enclosing class name for the element.
      Parameters:
      consumer - consumer of builder for service type name
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

      public BUILDER serviceTypeName(Supplier<? extends TypeName> supplier)
      The enclosing class name for the element.
      Parameters:
      supplier - supplier of service type name
      Returns:
      updated builder instance
      See Also:
    • annotations

      public BUILDER annotations(Set<? extends Annotation> annotations)
      The annotations on this element.
      Parameters:
      annotations - the annotations on this element
      Returns:
      updated builder instance
      See Also:
    • addAnnotations

      public BUILDER addAnnotations(Set<? extends Annotation> annotations)
      The annotations on this element.
      Parameters:
      annotations - the annotations on this element
      Returns:
      updated builder instance
      See Also:
    • addAnnotation

      public BUILDER addAnnotation(Annotation annotation)
      The annotations on this element.
      Parameters:
      annotation - the annotations on this element
      Returns:
      updated builder instance
      See Also:
    • addAnnotation

      public BUILDER addAnnotation(Consumer<Annotation.Builder> consumer)
      The annotations on this element.
      Parameters:
      consumer - the annotations on this element
      Returns:
      updated builder instance
      See Also:
    • qualifiers

      public BUILDER qualifiers(Set<? extends Qualifier> qualifiers)
      The qualifier type annotations on this element.
      Parameters:
      qualifiers - the qualifier type annotations on this element
      Returns:
      updated builder instance
      See Also:
    • addQualifiers

      public BUILDER addQualifiers(Set<? extends Qualifier> qualifiers)
      The qualifier type annotations on this element.
      Parameters:
      qualifiers - the qualifier type annotations on this element
      Returns:
      updated builder instance
      See Also:
    • addQualifier

      public BUILDER addQualifier(Qualifier qualifier)
      The qualifier type annotations on this element.
      Parameters:
      qualifier - the qualifier type annotations on this element
      Returns:
      updated builder instance
      See Also:
    • addQualifier

      public BUILDER addQualifier(Consumer<Qualifier.Builder> consumer)
      The qualifier type annotations on this element.
      Parameters:
      consumer - the qualifier type annotations on this element
      Returns:
      updated builder instance
      See Also:
    • elementKind

      public Optional<ElementKind> elementKind()
      The injection point/receiver kind.
      Returns:
      the element kind
    • access

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

      public Optional<TypeName> elementTypeName()
      The element type name (e.g., method type or field type).
      Returns:
      the element type name
    • elementName

      public Optional<String> elementName()
      The element name (e.g., method name or field name).
      Returns:
      the element name
    • elementOffset

      public Optional<Integer> elementOffset()
      If the element is a method or constructor then this is the ordinal argument position of that argument.
      Returns:
      the element offset
    • elementArgs

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

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

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

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

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

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

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

      protected void validatePrototype()
      Validates required properties.