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

public Interface ReflectiveInvocationContext<T extends Executable>

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

ReflectiveInvocationContext encapsulates the context of a reflective invocation of an executable (method or constructor).

This interface is not intended to be implemented by clients.

Since
5.5

Method Summary

Modifier and TypeMethod and Description
public List<Object>

Returns:

the arguments of the executable in this invocation context; immutable and never null
getArguments
()

Get the arguments of the executable in this invocation context.

public T

Returns:

the executable of this invocation context; never null
getExecutable
()

Get the method or constructor of this invocation context.

public Optional<Object>

Returns:

the target of the executable of this invocation context; never null but potentially empty
getTarget
()

Get the target object of this invocation context, if available.

public Class<?>

Returns:

the target class of this invocation context; never null
getTargetClass
()

Get the target class of this invocation context.

Method Detail

getArgumentsback to summary
public List<Object> getArguments()

Get the arguments of the executable in this invocation context.

Returns:List<Object>

the arguments of the executable in this invocation context; immutable and never null

getExecutableback to summary
public T getExecutable()

Get the method or constructor of this invocation context.

Returns:T

the executable of this invocation context; never null

getTargetback to summary
public Optional<Object> getTarget()

Get the target object of this invocation context, if available.

If this invocation context represents an instance method, this method returns the object the method will be invoked on. Otherwise, if this invocation context represents a static method or constructor, this method returns empty().

Returns:Optional<Object>

the target of the executable of this invocation context; never null but potentially empty

getTargetClassback to summary
public Class<?> getTargetClass()

Get the target class of this invocation context.

If this invocation context represents an instance method, this method returns the class of the object the method will be invoked on, not the class it is declared in. Otherwise, if this invocation represents a static method or constructor, this method returns the class the method or constructor is declared in.

Returns:Class<?>

the target class of this invocation context; never null