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.Builder<BUILDER,PROTOTYPE>
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>
Fluent API builder base for InjectionPointInfo.
  • 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
    • 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:
    • ipType

      public BUILDER ipType(Supplier<? extends TypeName> supplier)
      Type of the field or argument we are injecting into.
      Parameters:
      supplier - supplier of 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:
    • dependencyToServiceInfo

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

      public Optional<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 Optional<TypeName> ipType()
      Type of the field or argument we are injecting into.
      Returns:
      the ip type
    • id

      public Optional<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 Optional<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 Optional<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>
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
      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>