Package org.junit.jupiter.api.extension
Interface ExecutableInvoker
-
@API(status=EXPERIMENTAL, since="5.9") public interface ExecutableInvoker
ExecutableInvoker
allows invoking methods and constructors with support for dynamic resolution of parameters viaParameterResolvers
.- Since:
- 5.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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 suppliedstatic
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.
-
-
-
Method Detail
-
invoke
default java.lang.Object invoke(java.lang.reflect.Method method)
Invoke the suppliedstatic
method with dynamic parameter resolution.- Parameters:
method
- the method to invoke and resolve parameters for- See Also:
invoke(Method, Object)
-
invoke
java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object target)
Invoke the supplied method with dynamic parameter resolution.- Parameters:
method
- the method to invoke and resolve parameters fortarget
- the target on which the executable will be invoked; can benull
forstatic
methods
-
invoke
default <T> T invoke(java.lang.reflect.Constructor<T> constructor)
Invoke the supplied top-level constructor with dynamic parameter resolution.- Parameters:
constructor
- the constructor to invoke and resolve parameters for- See Also:
invoke(Constructor, Object)
-
invoke
<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.Use this method when invoking the constructor for an inner class.
- Parameters:
constructor
- the constructor to invoke and resolve parameters forouterInstance
- the outer instance to supply as the first argument to the constructor; must benull
for top-level classes orstatic
nested classes
-
-