Interface InterceptionContext

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
InterceptionContext.BuilderBase.InterceptionContextImpl

public interface InterceptionContext extends Prototype.Api
Invocation context provides metadata about the invoked element to an interceptor. Used by Interception.Interceptor.
See Also:
  • Method Details

    • builder

      static InterceptionContext.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static InterceptionContext create()
      Create a new instance with default values.
      Returns:
      a new instance
    • serviceInstance

      Optional<Object> serviceInstance()
      The service instance being intercepted. This always returns the underlying instance.
      Returns:
      instance being intercepted, or empty optional if the intercepted method is not done on an instance (i.e. a constructor interception)
    • serviceInfo

      ServiceInfo serviceInfo()
      The service being intercepted.
      Returns:
      the service being intercepted
    • typeAnnotations

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

      TypedElementInfo elementInfo()
      The element info represents the method, field, or the constructor being invoked.
      Returns:
      the element info of element being intercepted