@API(status=INTERNAL,
since="5.0")
public class ExecutableInvoker
extends Object
ExecutableInvoker 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 | Description |
|---|---|---|
static interface |
ExecutableInvoker.ReflectiveInterceptorCall<E extends Executable,T> |
| Constructor | Description |
|---|---|
ExecutableInvoker() |
| Modifier and Type | Method | Description |
|---|---|---|
<T> T |
invoke(Constructor<T> constructor,
Optional<Object> outerInstance,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
ExecutableInvoker.ReflectiveInterceptorCall<Constructor<T>,T> interceptorCall) |
Invoke the supplied constructor with the supplied outer instance and
dynamic parameter resolution.
|
<T> T |
invoke(Method method,
Object target,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry,
ExecutableInvoker.ReflectiveInterceptorCall<Method,T> interceptorCall) |
Invoke the supplied
static method with dynamic parameter resolution. |
public <T> T invoke(Constructor<T> constructor, Optional<Object> outerInstance, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, ExecutableInvoker.ReflectiveInterceptorCall<Constructor<T>,T> interceptorCall)
This method should only be used to invoke the constructor for an inner class.
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(Method method, Object target, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, ExecutableInvoker.ReflectiveInterceptorCall<Method,T> interceptorCall)
static method with dynamic parameter resolution.method - the method to invoke and resolve parameters forextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers frominterceptorCall - the call for intercepting this method invocation
via all registered interceptorsCopyright © 2019. All rights reserved.