javax.ws.rs
Annotation Type DefaultValue


@Target(value={PARAMETER,METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface DefaultValue

Defines the default value of request metadata that is bound using one of the following annotations: PathParam, QueryParam, MatrixParam, CookieParam, FormParam, or HeaderParam. The default value is used if the corresponding metadata is not present in the request.

If the type of the annotated parameter is List, Set or SortedSet then the resulting collection will have a single entry mapped from the supplied default value.

If this annotation is not used and the corresponding metadata is not present in the request, the value will be an empty collection for List, Set or SortedSet, null for other object types, and the Java-defined default for primitive types.

See Also:
PathParam, QueryParam, FormParam, HeaderParam, MatrixParam, CookieParam

Required Element Summary
 java.lang.String value
          The default value.
 

Element Detail

value

public abstract java.lang.String value
The default value.



Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41