Package io.micronaut.aop
Interface MethodInterceptor<T,R>
-
- Type Parameters:
T
- The declaring typeR
- The result of the method call
- All Superinterfaces:
Interceptor<T,R>
,io.micronaut.core.order.Ordered
public interface MethodInterceptor<T,R> extends Interceptor<T,R>
A MethodInterceptor extends the genericInterceptor
and provides an interface more specific to method interception.- Since:
- 1.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.aop.Interceptor
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default R
intercept(InvocationContext<T,R> context)
Intercepts an execution from a declaredAround
advice.R
intercept(MethodInvocationContext<T,R> context)
Extended version of theintercept(InvocationContext)
method that accepts aMethodInvocationContext
.
-
-
-
Method Detail
-
intercept
@Nullable R intercept(MethodInvocationContext<T,R> context)
Extended version of theintercept(InvocationContext)
method that accepts aMethodInvocationContext
.- Parameters:
context
- The context- Returns:
- The result
-
intercept
@Nullable default R intercept(InvocationContext<T,R> context)
Description copied from interface:Interceptor
Intercepts an execution from a declaredAround
advice. The implementation can either callInvocationContext.proceed()
to return the original value or provide a replacement value- Specified by:
intercept
in interfaceInterceptor<T,R>
- Parameters:
context
- The interception context- Returns:
- result type
-
-