@API(value=Internal) public class ExecutableInvoker extends java.lang.Object
ExecutableInvoker encapsulates the invocation of a
Executable (i.e., method or constructor),
including support for dynamic resolution of method parameters via
ParameterResolvers.| Constructor and Description |
|---|
ExecutableInvoker() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
invoke(java.lang.reflect.Constructor<T> constructor,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
Invoke the supplied constructor with dynamic parameter resolution.
|
<T> T |
invoke(java.lang.reflect.Constructor<T> constructor,
java.lang.Object outerInstance,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
Invoke the supplied constructor with the supplied outer instance and
dynamic parameter resolution.
|
java.lang.Object |
invoke(java.lang.reflect.Method method,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
Invoke the supplied
static method with dynamic parameter resolution. |
java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object target,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
Invoke the supplied method on the supplied target object with dynamic parameter
resolution.
|
public <T> T invoke(java.lang.reflect.Constructor<T> constructor,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
constructor - the constructor to invoke and resolve parameters forextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers frompublic <T> T invoke(java.lang.reflect.Constructor<T> constructor,
java.lang.Object outerInstance,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
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 constructorextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers frompublic java.lang.Object invoke(java.lang.reflect.Method method,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
static method with dynamic parameter resolution.method - the method to invoke and resolve parameters forextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers frompublic java.lang.Object invoke(java.lang.reflect.Method method,
java.lang.Object target,
ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry)
method - the method to invoke and resolve parameters fortarget - the object on which the method will be invoked; should be
null for static methodsextensionContext - the current ExtensionContextextensionRegistry - the ExtensionRegistry to retrieve
ParameterResolvers from