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

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

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

    • BuilderBase

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

    • from

      public BUILDER from(DependencyInfo 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(DependencyInfo.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
    • elementName

      public BUILDER elementName(String elementName)
      Name of the dependency location, such as a field name, or argument name.
      Parameters:
      elementName - name of the element of this dependency
      Returns:
      updated builder instance
      See Also:
    • dependencyTo

      public BUILDER dependencyTo(ServiceInfoCriteria dependencyTo)
      The service info describing what the injection point dependencies are dependent upon.
      Parameters:
      dependencyTo - the service info dependency
      Returns:
      updated builder instance
      See Also:
    • dependencyTo

      public BUILDER dependencyTo(Consumer<ServiceInfoCriteria.Builder> consumer)
      The service info describing what the injection point dependencies are dependent upon.
      Parameters:
      consumer - consumer of builder for the service info dependency
      Returns:
      updated builder instance
      See Also:
    • dependencyTo

      public BUILDER dependencyTo(Supplier<? extends ServiceInfoCriteria> supplier)
      The service info describing what the injection point dependencies are dependent upon.
      Parameters:
      supplier - supplier of the service info dependency
      Returns:
      updated builder instance
      See Also:
    • injectionPointDependencies

      public BUILDER injectionPointDependencies(Set<? extends InjectionPointInfo> injectionPointDependencies)
      The set of injection points that depends upon dependencyTo().
      Parameters:
      injectionPointDependencies - the set of dependencies
      Returns:
      updated builder instance
      See Also:
    • addInjectionPointDependencies

      public BUILDER addInjectionPointDependencies(Set<? extends InjectionPointInfo> injectionPointDependencies)
      The set of injection points that depends upon dependencyTo().
      Parameters:
      injectionPointDependencies - the set of dependencies
      Returns:
      updated builder instance
      See Also:
    • addInjectionPointDependency

      public BUILDER addInjectionPointDependency(InjectionPointInfo injectionPointDependency)
      The set of injection points that depends upon dependencyTo().
      Parameters:
      injectionPointDependency - the set of dependencies
      Returns:
      updated builder instance
      See Also:
    • addInjectionPointDependency

      public BUILDER addInjectionPointDependency(Consumer<InjectionPointInfo.Builder> consumer)
      The set of injection points that depends upon dependencyTo().
      Parameters:
      consumer - the set of dependencies
      Returns:
      updated builder instance
      See Also:
    • clearResolvedTo

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

      public BUILDER resolvedTo(ServiceProvider<?> resolvedTo)
      The ServiceProvider that this dependency is optional resolved and bound to. All dependencies from injectionPointDependencies() will be bound to this resolution.
      Parameters:
      resolvedTo - the optional resolved and bounded service provider
      Returns:
      updated builder instance
      See Also:
    • elementName

      public Optional<String> elementName()
      Name of the dependency location, such as a field name, or argument name.
      Returns:
      the element name
    • dependencyTo

      public Optional<ServiceInfoCriteria> dependencyTo()
      The service info describing what the injection point dependencies are dependent upon.
      Returns:
      the dependency to
    • injectionPointDependencies

      public Set<InjectionPointInfo> injectionPointDependencies()
      The set of injection points that depends upon dependencyTo().
      Returns:
      the injection point dependencies
    • resolvedTo

      public Optional<ServiceProvider<?>> resolvedTo()
      The ServiceProvider that this dependency is optional resolved and bound to. All dependencies from injectionPointDependencies() will be bound to this resolution.
      Returns:
      the resolved to
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.