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 SummaryFields inherited from interface io.micronaut.aop.InterceptorARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGETFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Method SummaryModifier 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- 
interceptExtended 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.
 
- 
interceptDescription 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 interface- Interceptor<T,- T> 
- Parameters:
- context- The interception context
- Returns:
- result type
 
 
-