public class RequestParameter<T> extends Parameter<T>
Parameter.Type| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Optional<T> |
defaultValue |
private String |
name |
| Constructor and Description |
|---|
RequestParameter(String name,
Parameter.Type parameterType,
Class<T> type)
Constructs a RequestParameter with a name,
Paramter.Type, and specifies the type of the value in the parameter. |
RequestParameter(String name,
Parameter.Type parameterType,
T defaultValue,
Class<T> type)
Constructs a RequestParameter with a name,
Parameter.Type, and specifies the type of the value in the parameter and allows
for a default value to be specified which will be used if the parameter is missing from the request. |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<T> |
getDefaultValue() |
String |
getName() |
String |
toString() |
private final String name
private final com.google.common.base.Optional<T> defaultValue
public RequestParameter(String name, Parameter.Type parameterType, Class<T> type)
Paramter.Type, and specifies the type of the value in the parameter.name - the name of this parameter, the name of the query, form, cookie, header, or path parameter.parameterType - the Parameter.Type of this parameter.type - the class type of this parameter.public RequestParameter(String name, Parameter.Type parameterType, T defaultValue, Class<T> type)
Parameter.Type, and specifies the type of the value in the parameter and allows
for a default value to be specified which will be used if the parameter is missing from the request.name - the name of this parameter, the name of the query, form, cookie, header, or path parameter.parameterType - the Parameter.Type of this parameter.defaultValue - the value to be used if this parameter, identified by name, is missing from the request.type - the class type of this parameter.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.