public class Parameter<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Parameter.Type |
| Modifier and Type | Field and Description |
|---|---|
private Parameter.Type |
parameterType |
private Class<T> |
type |
| Constructor and Description |
|---|
Parameter(Parameter.Type parameterType,
Class<T> type)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Parameter.Type |
getParameterType()
Gets the
Parameter.Type of this parameter. |
Class<?> |
getType()
Gets the type of this parameter.
|
int |
hashCode() |
static <T> Parameter<T> |
param(Class<T> type) |
static <T> Parameter<T> |
param(String name,
Class<T> type) |
static <T> Parameter<T> |
param(String name,
T defaultValue,
Class<T> type) |
String |
toString() |
private final Parameter.Type parameterType
public Parameter(Parameter.Type parameterType, Class<T> type)
parameterType - the Parameter.Type of request parameter.type - the expected type of the value of the request parameter.public Parameter.Type getParameterType()
Parameter.Type of this parameter. The parameter migth come from a request query param, a form param,
a header param, a cookie param, or could be in the body of the request.Type the Parameter.Type of this parameter.public Class<?> getType()
Parameter.Type, for example the Type might
be a query param (REQUEST) and the value of that query param might be of type String.class.Class the class type of this parameter.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.