Class InterceptedMethod<I,V>

java.lang.Object
io.helidon.inject.runtime.InterceptedMethod<I,V>
Type Parameters:
I - the intercepted type
V - the intercepted method return type
All Implemented Interfaces:
Function<Object[],V>

public abstract class InterceptedMethod<I,V> extends Object implements Function<Object[],V>
Base class, used in Interceptor generated code. One of these instances will be created for each intercepted method.
  • Constructor Details

    • InterceptedMethod

      protected InterceptedMethod(I interceptedImpl, ServiceProvider<?> serviceProvider, TypeName serviceTypeName, List<Annotation> serviceLevelAnnotations, List<Provider<Interceptor>> interceptors, TypedElementInfo methodInfo, List<TypedElementInfo> methodArgInfo)
      The constructor.
      Parameters:
      interceptedImpl - the intercepted instance
      serviceProvider - the service provider for the intercepted type
      serviceTypeName - the service type name
      serviceLevelAnnotations - the service level annotations
      interceptors - the interceptors for the method
      methodInfo - the method element info
      methodArgInfo - the method args element info
    • InterceptedMethod

      protected InterceptedMethod(I interceptedImpl, ServiceProvider<?> serviceProvider, TypeName serviceTypeName, List<Annotation> serviceLevelAnnotations, List<Provider<Interceptor>> interceptors, TypedElementInfo methodInfo)
      The constructor.
      Parameters:
      interceptedImpl - the intercepted instance
      serviceProvider - the service provider for the intercepted type
      serviceTypeName - the service type name
      serviceLevelAnnotations - the service level annotations
      interceptors - the interceptors for the method
      methodInfo - the method element info
  • Method Details

    • impl

      public I impl()
      The intercepted instance.
      Returns:
      the intercepted instance
    • ctx

      public io.helidon.inject.api.InvocationContext ctx()
      The intercepted invocation context.
      Returns:
      the intercepted invocation context
    • invoke

      public abstract V invoke(Object... args) throws Throwable
      Make the invocation to an interceptor method.
      Parameters:
      args - arguments
      Returns:
      the result of the call to the intercepted method
      Throws:
      Throwable - if there is any throwables encountered as part of the invocation
    • apply

      public V apply(Object... args)
      Specified by:
      apply in interface Function<I,V>