T
- The bean type@FunctionalInterface public interface ConstructorInterceptor<T> extends Interceptor<T,T>
ConstructorInterceptor
extends the default Interceptor
interface and allows intercepting constructors.ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier and Type | Method and Description |
---|---|
T |
intercept(ConstructorInvocationContext<T> context)
Extended version of the
intercept(InvocationContext) method that accepts a ConstructorInvocationContext . |
default T |
intercept(InvocationContext<T,T> context)
Intercepts an execution from a declared
Around advice. |
@NonNull T intercept(@NonNull ConstructorInvocationContext<T> context)
intercept(InvocationContext)
method that accepts a ConstructorInvocationContext
.
It is illegal for constructor interceptors to return null
and an exception will be thrown if this occurs.
context
- The contextnull
.@NonNull default T intercept(@NonNull InvocationContext<T,T> context)
Interceptor
Around
advice. The implementation can either call InvocationContext.proceed()
to return the original value or provide a replacement valueintercept
in interface Interceptor<T,T>
context
- The interception context