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

java.lang.Object
io.helidon.service.registry.InterceptionContext.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:
InterceptionContext.Builder
Enclosing interface:
InterceptionContext

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

    • BuilderBase

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

    • from

      public BUILDER from(InterceptionContext prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(InterceptionContext.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
    • clearServiceInstance

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

      public BUILDER serviceInstance(Object serviceInstance)
      The service instance being intercepted. This always returns the underlying instance.
      Parameters:
      serviceInstance - instance being intercepted, or empty optional if the intercepted method is not done on an instance (i.e. a constructor interception)
      Returns:
      updated builder instance
      See Also:
    • serviceInfo

      public BUILDER serviceInfo(ServiceInfo serviceInfo)
      The service being intercepted.
      Parameters:
      serviceInfo - the service being intercepted
      Returns:
      updated builder instance
      See Also:
    • typeAnnotations

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

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

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

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

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

      public Optional<Object> serviceInstance()
      The service instance being intercepted. This always returns the underlying instance.
      Returns:
      the service instance
    • serviceInfo

      public Optional<ServiceInfo> serviceInfo()
      The service being intercepted.
      Returns:
      the service info
    • typeAnnotations

      public List<Annotation> typeAnnotations()
      Annotations on the enclosing type.
      Returns:
      the type annotations
    • elementInfo

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

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

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

      protected void validatePrototype()
      Validates required properties.