@API(status=INTERNAL,
since="5.0")
public class InterceptingExecutableInvoker
extends java.lang.Object
InterceptingExecutableInvoker encapsulates the invocation of a
Executable (i.e., method or constructor),
including support for dynamic resolution of method parameters via
ParameterResolvers.| Modifier and Type | Class and Description |
|---|---|
static interface |
InterceptingExecutableInvoker.ReflectiveInterceptorCall<E extends java.lang.reflect.Executable,T> |
| Modifier and Type | Field and Description |
|---|---|
private static InvocationInterceptorChain |
interceptorChain |
| Constructor and Description |
|---|
InterceptingExecutableInvoker() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
invoke(java.lang.reflect.Constructor<T> constructor,
java.util.Optional<java.lang.Object> outerInstance,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
InterceptingExecutableInvoker.ReflectiveInterceptorCall<java.lang.reflect.Constructor<T>,T> interceptorCall)
Invoke the supplied constructor with the supplied outer instance and
dynamic parameter resolution.
|
private <E extends java.lang.reflect.Executable,T> |
invoke(InvocationInterceptor.Invocation<T> originalInvocation,
ReflectiveInvocationContext<E> invocationContext,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
InterceptingExecutableInvoker.ReflectiveInterceptorCall<E,T> call) |
<T> T |
invoke(java.lang.reflect.Method method,
java.lang.Object target,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
InterceptingExecutableInvoker.ReflectiveInterceptorCall<java.lang.reflect.Method,T> interceptorCall)
Invoke the supplied method with dynamic parameter resolution.
|
private static final InvocationInterceptorChain interceptorChain
public <T> T invoke(java.lang.reflect.Constructor<T> constructor,
java.util.Optional<java.lang.Object> outerInstance,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
InterceptingExecutableInvoker.ReflectiveInterceptorCall<java.lang.reflect.Constructor<T>,T> interceptorCall)
constructor - the constructor to invoke and resolve parameters forouterInstance - the outer instance to supply as the first argument
to the constructor; empty, for top-level classesextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers frominterceptorCall - the call for intercepting this constructor
invocation via all registered interceptorspublic <T> T invoke(java.lang.reflect.Method method,
java.lang.Object target,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
InterceptingExecutableInvoker.ReflectiveInterceptorCall<java.lang.reflect.Method,T> interceptorCall)
method - the method to invoke and resolve parameters fortarget - the target on which the executable will be invoked,
potentially wrapped in an Optional; can be null or an
empty Optional for a static methodextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers frominterceptorCall - the call for intercepting this method invocation
via all registered interceptorsprivate <E extends java.lang.reflect.Executable,T> T invoke(InvocationInterceptor.Invocation<T> originalInvocation, ReflectiveInvocationContext<E> invocationContext, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, InterceptingExecutableInvoker.ReflectiveInterceptorCall<E,T> call)