@API(status=EXPERIMENTAL,
since="5.9")
public interface ExecutableInvoker
ExecutableInvoker allows invoking methods and constructors
with support for dynamic resolution of parameters via
ParameterResolvers.| Modifier and Type | Method and Description |
|---|---|
default <T> T |
invoke(java.lang.reflect.Constructor<T> constructor)
Invoke the supplied top-level constructor with dynamic parameter resolution.
|
<T> T |
invoke(java.lang.reflect.Constructor<T> constructor,
java.lang.Object outerInstance)
Invoke the supplied constructor with the supplied outer instance and
dynamic parameter resolution.
|
default java.lang.Object |
invoke(java.lang.reflect.Method method)
Invoke the supplied
static method with dynamic parameter resolution. |
java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object target)
Invoke the supplied method with dynamic parameter resolution.
|
default java.lang.Object invoke(java.lang.reflect.Method method)
static method with dynamic parameter resolution.method - the method to invoke and resolve parameters forinvoke(Method, Object)java.lang.Object invoke(java.lang.reflect.Method method,
java.lang.Object target)
method - the method to invoke and resolve parameters fortarget - the target on which the executable will be invoked;
can be null for static methodsdefault <T> T invoke(java.lang.reflect.Constructor<T> constructor)
constructor - the constructor to invoke and resolve parameters forinvoke(Constructor, Object)<T> T invoke(java.lang.reflect.Constructor<T> constructor,
java.lang.Object outerInstance)
Use this method when invoking 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; must be null for top-level classes
or static nested classes