Package org.glassfish.hk2.utilities
Class MethodParameterImpl
- java.lang.Object
-
- org.glassfish.hk2.utilities.MethodParameterImpl
-
- All Implemented Interfaces:
MethodParameter
public class MethodParameterImpl extends java.lang.Object implements MethodParameter
An implementation ofMethodParameter
that has immutable position and value
-
-
Constructor Summary
Constructors Constructor Description MethodParameterImpl(int index, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getParameterPosition()
Returns the index of the parameter for which theMethodParameter.getParameterValue()
result should gojava.lang.Object
getParameterValue()
The value that should be given to the method at the parameter position specified byMethodParameter.getParameterPosition()
java.lang.String
toString()
-
-
-
Method Detail
-
getParameterPosition
public int getParameterPosition()
Description copied from interface:MethodParameter
Returns the index of the parameter for which theMethodParameter.getParameterValue()
result should go- Specified by:
getParameterPosition
in interfaceMethodParameter
- Returns:
- The index of the parameter in the method where the parameter value should go
-
getParameterValue
public java.lang.Object getParameterValue()
Description copied from interface:MethodParameter
The value that should be given to the method at the parameter position specified byMethodParameter.getParameterPosition()
- Specified by:
getParameterValue
in interfaceMethodParameter
- Returns:
- The possibly null parameter value that should be passed to the method at the given index
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-