@API(status=EXPERIMENTAL,
since="5.5")
public interface ReflectiveInvocationContext<T extends Executable>
ReflectiveInvocationContext
encapsulates the context of
a reflective invocation of an executable (method or constructor).
This interface is not intended to be implemented by clients.
Modifier and Type | Method | Description |
---|---|---|
List<Object> |
getArguments() |
Get the arguments of the executable in this invocation context.
|
T |
getExecutable() |
Get the method or constructor of this invocation context.
|
Optional<Object> |
getTarget() |
Get the target object of this invocation context, if available.
|
Class<?> |
getTargetClass() |
Get the target class of this invocation context.
|
Class<?> getTargetClass()
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.
null
T getExecutable()
null
List<Object> getArguments()
null
Optional<Object> getTarget()
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()
.
null
but potentially emptyCopyright © 2019. All rights reserved.