class DefaultParameterContext extends java.lang.Object implements ParameterContext
| Modifier and Type | Field and Description |
|---|---|
private int |
index |
private java.lang.reflect.Parameter |
parameter |
private java.util.Optional<java.lang.Object> |
target |
| Constructor and Description |
|---|
DefaultParameterContext(java.lang.reflect.Parameter parameter,
int index,
java.util.Optional<java.lang.Object> target) |
| Modifier and Type | Method and Description |
|---|---|
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.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDeclaringExecutableprivate final java.lang.reflect.Parameter parameter
private final int index
private final java.util.Optional<java.lang.Object> target
DefaultParameterContext(java.lang.reflect.Parameter parameter,
int index,
java.util.Optional<java.lang.Object> target)
public java.lang.reflect.Parameter getParameter()
ParameterContextParameter for this context.getParameter in interface ParameterContextnullParameterContext.getIndex()public int getIndex()
ParameterContextParameter for this context within the
parameter list of the Executable that
declares the parameter.getIndex in interface ParameterContextParameterContext.getParameter(),
Executable.getParameters()public java.util.Optional<java.lang.Object> getTarget()
ParameterContextExecutable
that declares the Parameter for this context will
be invoked, if available.getTarget in interface ParameterContextOptional 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.public java.lang.String toString()
toString in class java.lang.Object