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

public Interface ExecutableInvoker

Annotations
@API
status:STABLE
since:5.11
Static Imports
org.apiguardian.api.API.Status.STABLE

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 @Nullable Object
invoke(Method
the method to invoke and resolve parameters for
method
)

Invoke the supplied static method with dynamic parameter resolution.

public @Nullable Object
invoke(Method
the method to invoke and resolve parameters for
method
,
@Nullable 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
,
@Nullable 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 @Nullable 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 @Nullable Object invoke(Method method, @Nullable Object target)

Invoke the supplied method with dynamic parameter resolution.

Parameters
method:Method

the method to invoke and resolve parameters for

target:@Nullable 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, @Nullable 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:@Nullable Object

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