javax.ws.rs
Annotation Type QueryParam
@Target(value=PARAMETER)
@Retention(value=RUNTIME)
public @interface QueryParam
Binds a HTTP query parameter to a Java method parameter.
The value is URL decoded unless this is disabled using the Encoded
annotation. A default value can be specified using the DefaultValue
annotation.
The type of the annotated parameter must either:
- Be a primitive type
- Have a constructor that accepts a single String argument
- Have a static method named
valueOf
that accepts a single
String argument (see, for example, Integer.valueOf(String)
)
- See Also:
DefaultValue
,
Encoded
Required Element Summary |
java.lang.String |
value
Defines the name of the HTTP query parameter whose value will be used
to initialize the value of the annotated method argument, class field or
bean property. |
value
public abstract java.lang.String value
- Defines the name of the HTTP query parameter whose value will be used
to initialize the value of the annotated method argument, class field or
bean property.