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 ofMethodParameterthat 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 intgetParameterPosition()Returns the index of the parameter for which theMethodParameter.getParameterValue()result should gojava.lang.ObjectgetParameterValue()The value that should be given to the method at the parameter position specified byMethodParameter.getParameterPosition()java.lang.StringtoString()
-
-
-
Method Detail
-
getParameterPosition
public int getParameterPosition()
Description copied from interface:MethodParameterReturns the index of the parameter for which theMethodParameter.getParameterValue()result should go- Specified by:
getParameterPositionin 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:MethodParameterThe value that should be given to the method at the parameter position specified byMethodParameter.getParameterPosition()- Specified by:
getParameterValuein 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:
toStringin classjava.lang.Object
-
-