Class AbstractDependencyInfo.Builder<B extends AbstractDependencyInfo.Builder<B,T>,T extends DependencyInfo>

java.lang.Object
io.helidon.pico.api.AbstractDependencyInfo.Builder<B,T>
Type Parameters:
B - the type of the builder
T - the type of the built instance
All Implemented Interfaces:
Builder<B,T>, DependencyInfo, Supplier<T>
Direct Known Subclasses:
DefaultDependencyInfo.Builder
Enclosing class:
AbstractDependencyInfo

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

    • injectionPointDependencies

      protected final Set injectionPointDependencies
      Field value for java.util.Set<? extends io.helidon.pico.api.InjectionPointInfo> injectionPointDependencies().
  • Constructor Details

    • Builder

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

    • dependencyTo

      public ServiceInfoCriteria dependencyTo()
      Description copied from interface: DependencyInfo
      The service info describing what the injection point dependencies are dependent upon.
      Specified by:
      dependencyTo in interface DependencyInfo
      Returns:
      the service info dependency
    • injectionPointDependencies

      public Set<? extends InjectionPointInfo> injectionPointDependencies()
      Description copied from interface: DependencyInfo
      The set of injection points that depends upon DependencyInfo.dependencyTo().
      Specified by:
      injectionPointDependencies in interface DependencyInfo
      Returns:
      the set of dependencies
    • resolvedTo

      public Optional<ServiceProvider<?>> resolvedTo()
      Description copied from interface: DependencyInfo
      The ServiceProvider that this dependency is optional resolved and bound to. All dependencies from DependencyInfo.injectionPointDependencies() will be bound to this resolution.
      Specified by:
      resolvedTo in interface DependencyInfo
      Returns:
      the optional resolved and bounded service provider
    • dependencyTo

      public B dependencyTo(ServiceInfoCriteria val)
      Setter for 'dependencyTo'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • injectionPointDependencies

      public B injectionPointDependencies(Collection<? extends InjectionPointInfo> val)
      Setter for 'injectionPointDependencies'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addInjectionPointDependencies

      public B addInjectionPointDependencies(Collection<? extends InjectionPointInfo> val)
      Setter for 'injectionPointDependencies'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addInjectionPointDependency

      public B addInjectionPointDependency(InjectionPointInfo val)
      Setter for 'injectionPointDependencies'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • resolvedTo

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

      public B resolvedTo(ServiceProvider<?> val)
      Setter for 'resolvedTo'.
      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.DependencyInfo, 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