Class AbstractInvocationContext.Builder<B extends AbstractInvocationContext.Builder<B,T>,T extends InvocationContext>

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

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

    • classAnnotations

      protected final List classAnnotations
      Field value for java.util.List<io.helidon.common.types.AnnotationAndValue> classAnnotations().
    • interceptors

      protected final List interceptors
      Field value for java.util.List<jakarta.inject.Provider<io.helidon.pico.api.Interceptor>> interceptors().
    • contextData

      protected final Map contextData
      Field value for java.util.Map<java.lang.String, java.lang.Object> contextData().
  • Constructor Details

    • Builder

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

    • serviceProvider

      public ServiceProvider<?> serviceProvider()
      Description copied from interface: InvocationContext
      The service provider being intercepted.
      Specified by:
      serviceProvider in interface InvocationContext
      Returns:
      the service provider being intercepted
    • serviceTypeName

      public TypeName serviceTypeName()
      Description copied from interface: InvocationContext
      The service type name for the root service provider.
      Specified by:
      serviceTypeName in interface InvocationContext
      Returns:
      the service type name for the root service provider
    • classAnnotations

      public List<AnnotationAndValue> classAnnotations()
      Description copied from interface: InvocationContext
      The annotations on the enclosing type.
      Specified by:
      classAnnotations in interface InvocationContext
      Returns:
      the annotations on the enclosing type
    • elementInfo

      public TypedElementName elementInfo()
      Description copied from interface: InvocationContext
      The element info represents the method (or the constructor) being invoked.
      Specified by:
      elementInfo in interface InvocationContext
      Returns:
      the element info represents the method (or the constructor) being invoked
    • elementArgInfo

      public Optional<TypedElementName[]> elementArgInfo()
      Description copied from interface: InvocationContext
      The method/element argument info.
      Specified by:
      elementArgInfo in interface InvocationContext
      Returns:
      the method/element argument info
    • interceptors

      public List<Provider<Interceptor>> interceptors()
      Description copied from interface: InvocationContext
      The interceptor chain.
      Specified by:
      interceptors in interface InvocationContext
      Returns:
      the interceptor chain
    • contextData

      public Map<String,Object> contextData()
      Description copied from interface: InvocationContext
      The contextual info that can be shared between interceptors.
      Specified by:
      contextData in interface InvocationContext
      Returns:
      the read/write contextual data that is passed between each chained interceptor
    • serviceProvider

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

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

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

      public B elementInfo(TypedElementName val)
      Setter for 'elementInfo'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • elementArgInfo

      public B elementArgInfo(Optional<TypedElementName[]> val)
      Setter for 'elementArgInfo'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • elementArgInfo

      public B elementArgInfo(TypedElementName[] val)
      Setter for 'elementArgInfo'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • interceptors

      public B interceptors(Collection<Provider<Interceptor>> val)
      Setter for 'interceptors'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • contextData

      public B contextData(Map<String,Object> val)
      Setter for 'contextData'.
      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.InvocationContext, 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