Class Parameters
java.lang.Object
org.springframework.binding.method.Parameters
An ordered list of method parameters.
- Author:
- Keith Donald
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Parameters
Canonical instance for an empty parameters list. -
Constructor Summary
ConstructorDescriptionCreate a parameter list of the default size (3 elements).Parameters
(int size) Create a parameter list with the specified size.Parameters
(Parameter parameter) Create a parameter list with one parameter.Parameters
(Parameter... parameters) Create a parameter list from the parameter array. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Add a new parameter to this list.boolean
Add new parameters to this list.boolean
getParameter
(int index) Return the parameter at the provided index.Class<?>[]
Get an array containing each parameter type.int
hashCode()
iterator()
Return a parameter iterator.int
size()
Returns the number of parameters in this list.toString()
-
Field Details
-
NONE
Canonical instance for an empty parameters list.
-
-
Constructor Details
-
Parameters
public Parameters()Create a parameter list of the default size (3 elements). -
Parameters
public Parameters(int size) Create a parameter list with the specified size.- Parameters:
size
- the size
-
Parameters
Create a parameter list with one parameter.- Parameters:
parameter
- the single parameter
-
Parameters
Create a parameter list from the parameter array.- Parameters:
parameters
- the parameters
-
-
Method Details
-
add
Add a new parameter to this list.- Parameters:
parameter
- the parameter
-
addAll
Add new parameters to this list.- Parameters:
parameters
- the parameters
-
iterator
Return a parameter iterator.- Returns:
- the iterator
-
getTypesArray
Get an array containing each parameter type. The resulting array could contain null values if the corresponding parameters did not specify a parameter type.- Returns:
- the types
-
size
public int size()Returns the number of parameters in this list.- Returns:
- the size
-
getParameter
Return the parameter at the provided index.- Parameters:
index
- the parameter index- Returns:
- the parameter at that index
- Throws:
IndexOutOfBoundsException
- if the provided index is out of bounds
-
equals
-
hashCode
public int hashCode() -
toString
-