@API(status=STABLE, since="5.0") public interface ParameterContext
ParameterContext
encapsulates the context in which an
Executable
will be invoked for a given
Parameter
.
A ParameterContext
is used to support parameter resolution via
a ParameterResolver
.
ParameterResolver
,
Parameter
,
Executable
,
Method
,
Constructor
Modifier and Type | Method | Description |
---|---|---|
default java.lang.reflect.Executable |
getDeclaringExecutable() |
Get the
Executable (i.e., the Method or
Constructor ) that declares the Parameter
for this context. |
int |
getIndex() |
Get the index of the
Parameter for this context within the
parameter list of the Executable that
declares the parameter. |
java.lang.reflect.Parameter |
getParameter() |
Get the
Parameter for this context. |
java.util.Optional<java.lang.Object> |
getTarget() |
Get the target on which the
Executable
that declares the Parameter for this context will
be invoked, if available. |
java.lang.reflect.Parameter getParameter()
Parameter
for this context.null
getIndex()
int getIndex()
Parameter
for this context within the
parameter list of the Executable
that
declares the parameter.getParameter()
,
Executable.getParameters()
default java.lang.reflect.Executable getDeclaringExecutable()
Executable
(i.e., the Method
or
Constructor
) that declares the Parameter
for this context.Executable
; never null
Parameter.getDeclaringExecutable()
java.util.Optional<java.lang.Object> getTarget()
Executable
that declares the Parameter
for this context will
be invoked, if available.Optional
containing the target on which the
Executable
will be invoked; never null
but will be
empty if the Executable
is a constructor or a
static
method.