Package io.micronaut.aop
Interface ConstructorInterceptor<T>
- Type Parameters:
T- The bean type
- All Superinterfaces:
Interceptor<T,,T> Ordered
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A
ConstructorInterceptor extends the default Interceptor interface and allows intercepting constructors.- Since:
- 3.0.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.aop.Interceptor
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGETFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionintercept(@NonNull ConstructorInvocationContext<T> context) Extended version of theintercept(InvocationContext)method that accepts aConstructorInvocationContext.default Tintercept(@NonNull InvocationContext<T, T> context) Intercepts an execution from a declaredAroundadvice.
-
Method Details
-
intercept
Extended version of theintercept(InvocationContext)method that accepts aConstructorInvocationContext.It is illegal for constructor interceptors to return
nulland an exception will be thrown if this occurs.- Parameters:
context- The context- Returns:
- The constructed object. Should never be
null.
-
intercept
Description copied from interface:InterceptorIntercepts an execution from a declaredAroundadvice. The implementation can either callInvocationContext.proceed()to return the original value or provide a replacement value- Specified by:
interceptin interfaceInterceptor<T,T> - Parameters:
context- The interception context- Returns:
- result type
-