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

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

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

    • BuilderBase

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

    • from

      public BUILDER from(InvocationContext 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(InvocationContext.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
    • serviceProvider

      public BUILDER serviceProvider(ServiceProvider<?> serviceProvider)
      The service provider being intercepted.
      Parameters:
      serviceProvider - the service provider being intercepted
      Returns:
      updated builder instance
      See Also:
    • serviceTypeName

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

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

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

      public BUILDER classAnnotations(List<? extends Annotation> classAnnotations)
      The annotations on the enclosing type.
      Parameters:
      classAnnotations - the annotations on the enclosing type
      Returns:
      updated builder instance
      See Also:
    • addClassAnnotations

      public BUILDER addClassAnnotations(List<? extends Annotation> classAnnotations)
      The annotations on the enclosing type.
      Parameters:
      classAnnotations - the annotations on the enclosing type
      Returns:
      updated builder instance
      See Also:
    • elementInfo

      public BUILDER elementInfo(TypedElementInfo elementInfo)
      The element info represents the method (or the constructor) being invoked.
      Parameters:
      elementInfo - the element info represents the method (or the constructor) being invoked
      Returns:
      updated builder instance
      See Also:
    • elementInfo

      public BUILDER elementInfo(Consumer<TypedElementInfo.Builder> consumer)
      The element info represents the method (or the constructor) being invoked.
      Parameters:
      consumer - consumer of builder for the element info represents the method (or the constructor) being invoked
      Returns:
      updated builder instance
      See Also:
    • elementInfo

      public BUILDER elementInfo(Supplier<? extends TypedElementInfo> supplier)
      The element info represents the method (or the constructor) being invoked.
      Parameters:
      supplier - supplier of the element info represents the method (or the constructor) being invoked
      Returns:
      updated builder instance
      See Also:
    • elementArgInfo

      public BUILDER elementArgInfo(List<? extends TypedElementInfo> elementArgInfo)
      The method/element argument info.
      Parameters:
      elementArgInfo - the method/element argument info
      Returns:
      updated builder instance
      See Also:
    • addElementArgInfo

      public BUILDER addElementArgInfo(List<? extends TypedElementInfo> elementArgInfo)
      The method/element argument info.
      Parameters:
      elementArgInfo - the method/element argument info
      Returns:
      updated builder instance
      See Also:
    • interceptors

      public BUILDER interceptors(List<Provider<Interceptor>> interceptors)
      The interceptor chain.
      Parameters:
      interceptors - the interceptor chain
      Returns:
      updated builder instance
      See Also:
    • addInterceptors

      public BUILDER addInterceptors(List<Provider<Interceptor>> interceptors)
      The interceptor chain.
      Parameters:
      interceptors - the interceptor chain
      Returns:
      updated builder instance
      See Also:
    • contextData

      public BUILDER contextData(Map<? extends String,?> contextData)
      This method replaces all values with the new ones.
      Parameters:
      contextData - the read/write contextual data that is passed between each chained interceptor
      Returns:
      updated builder instance
      See Also:
    • addContextData

      public BUILDER addContextData(Map<? extends String,?> contextData)
      This method keeps existing values, then puts all new values into the map.
      Parameters:
      contextData - the read/write contextual data that is passed between each chained interceptor
      Returns:
      updated builder instance
      See Also:
    • serviceProvider

      public Optional<ServiceProvider<?>> serviceProvider()
      The service provider being intercepted.
      Returns:
      the service provider
    • serviceTypeName

      public Optional<TypeName> serviceTypeName()
      The service type name for the root service provider.
      Returns:
      the service type name
    • classAnnotations

      public List<Annotation> classAnnotations()
      The annotations on the enclosing type.
      Returns:
      the class annotations
    • elementInfo

      public Optional<TypedElementInfo> elementInfo()
      The element info represents the method (or the constructor) being invoked.
      Returns:
      the element info
    • elementArgInfo

      public List<TypedElementInfo> elementArgInfo()
      The method/element argument info.
      Returns:
      the element arg info
    • interceptors

      public List<Provider<Interceptor>> interceptors()
      The interceptor chain.
      Returns:
      the interceptors
    • contextData

      public Map<String,Object> contextData()
      The contextual info that can be shared between interceptors.
      Returns:
      the context data
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.