Top Description Methods
org.junit.jupiter.api.extension

public Interface ExecutableInvoker

Annotations
@API
status:EXPERIMENTAL
since:5.9
Static Imports
org.apiguardian.api.API.Status.EXPERIMENTAL

ExecutableInvoker allows invoking methods and constructors with support for dynamic resolution of parameters via ParameterResolvers.
Since
5.9

Method Summary

Modifier and TypeMethod and Description
public default Object
invoke(Method
the method to invoke and resolve parameters for
method
)

Invoke the supplied static method with dynamic parameter resolution.

public Object
invoke(Method
the method to invoke and resolve parameters for
method
,
Object
the target on which the executable will be invoked; can be null for static methods
target
)

Invoke the supplied method with dynamic parameter resolution.

public default <T> T
invoke(Constructor<T>
the constructor to invoke and resolve parameters for
constructor
)

Invoke the supplied top-level constructor with dynamic parameter resolution.

public <T> T
invoke(Constructor<T>
the constructor to invoke and resolve parameters for
constructor
,
Object
the outer instance to supply as the first argument to the constructor; must be null for top-level classes or static nested classes
outerInstance
)

Invoke the supplied constructor with the supplied outer instance and dynamic parameter resolution.

Method Detail

invokeback to summary
public default Object invoke(Method method)

Invoke the supplied static method with dynamic parameter resolution.

Parameters
method:Method

the method to invoke and resolve parameters for

See Also
invoke(Method, Object)
invokeback to summary
public Object invoke(Method method, Object target)

Invoke the supplied method with dynamic parameter resolution.

Parameters
method:Method

the method to invoke and resolve parameters for

target:Object

the target on which the executable will be invoked; can be null for static methods

invokeback to summary
public default <T> T invoke(Constructor<T> constructor)

Invoke the supplied top-level constructor with dynamic parameter resolution.

Parameters
constructor:Constructor<T>

the constructor to invoke and resolve parameters for

See Also
invoke(Constructor, Object)
invokeback to summary
public <T> T invoke(Constructor<T> constructor, 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:Constructor<T>

the constructor to invoke and resolve parameters for

outerInstance:Object

the outer instance to supply as the first argument to the constructor; must be null for top-level classes or static nested classes