org.glassfish.jersey.server.model

## Class Parameter

- java.lang.Object
- - org.glassfish.jersey.model.Parameter
  - - org.glassfish.jersey.server.model.Parameter

All Implemented Interfaces:
  AnnotatedElement

Direct Known Subclasses:
  Parameter.BeanParameter

    public class Parameter
    extends Parameter
    implements AnnotatedElement

Method parameter model.

Author:
  Marek Potociar

### Nested Class Summary

Nested Classes
`static class` `Parameter.BeanParameter` Bean Parameter class represents a parameter annotated with `BeanParam` which in fact represents additional set of parameters.
`static class` `Parameter.ServerParameterService`

### Nested classes/interfaces inherited from class org.glassfish.jersey.model.Parameter

`Parameter.ParamAnnotationHelper<T extends Annotation>, Parameter.ParamCreationFactory<PARAMETER extends Parameter>, Parameter.ParameterService, Parameter.Source`

### Constructor Summary

Constructors
`protected` `Parameter(Annotation[] markers, Annotation marker, Parameter.Source source, String sourceName, Class<?> rawType, Type type, boolean encoded, String defaultValue)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static <PARAMETER extends Parameter> PARAMETER` `create(Class concreteClass, Class declaringClass, boolean encodeByDefault, Class<?> rawType, Type type, Annotation[] annotations)` Create a parameter model.
`static <PARAMETER extends Parameter> List<PARAMETER>` `create(Class concreteClass, Class declaringClass, Constructor<?> ctor, boolean keepEncoded)` Create a list of parameter models for a given resource method handler injectable constructor.
`static <PARAMETER extends Parameter> List<PARAMETER>` `create(Class concreteClass, Class declaringClass, Method javaMethod, boolean keepEncoded)` Create a list of parameter models for a given Java method handling a resource method, sub-resource method or a sub-resource locator.
`protected static <PARAMETER extends Parameter> List<PARAMETER>` `createList(Class concreteClass, Class declaringClass, boolean keepEncoded, Class[] parameterTypes, Type[] genericParameterTypes, Annotation[][] parameterAnnotations, Class<?> parameterClass)`
`boolean` `isQualified()` Check if the parameter is `qualified`.
`static Parameter` `overrideSource(Parameter original, Parameter.Source source)` Create new parameter model by overriding `source` of the original parameter model.

### Methods inherited from class org.glassfish.jersey.model.Parameter

`create, createList, createList, equals, getAnnotation, getAnnotations, getDeclaredAnnotations, getDefaultValue, getRawType, getSource, getSourceAnnotation, getSourceName, getType, hasDefaultValue, hashCode, isAnnotationPresent, isEncoded, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.reflect.AnnotatedElement

`getAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresent`

### Constructor Detail

#### Parameter

    protected Parameter(Annotation[] markers,
                        Annotation marker,
                        Parameter.Source source,
                        String sourceName,
                        Class<?> rawType,
                        Type type,
                        boolean encoded,
                        String defaultValue)

### Method Detail

#### create

    public static <PARAMETER extends Parameter> PARAMETER create(Class concreteClass,
                                                                 Class declaringClass,
                                                                 boolean encodeByDefault,
                                                                 Class<?> rawType,
                                                                 Type type,
                                                                 Annotation[] annotations)

Create a parameter model.

Parameters:
  `concreteClass` - concrete resource method handler implementation class.
  `declaringClass` - declaring class of the method the parameter belongs to or field that this parameter represents.
  `encodeByDefault` - flag indicating whether the parameter should be encoded by default or not. Note that a presence of `Encoded` annotation in the list of the parameter `annotations` will override any value set in the flag to `true`.
  `rawType` - raw Java parameter type.
  `type` - generic Java parameter type.
  `annotations` - parameter annotations.
Returns:
  new parameter model.

#### createList

    protected static <PARAMETER extends Parameter> List<PARAMETER> createList(Class concreteClass,
                                                                              Class declaringClass,
                                                                              boolean keepEncoded,
                                                                              Class[] parameterTypes,
                                                                              Type[] genericParameterTypes,
                                                                              Annotation[][] parameterAnnotations,
                                                                              Class<?> parameterClass)

#### create

    public static <PARAMETER extends Parameter> List<PARAMETER> create(Class concreteClass,
                                                                       Class declaringClass,
                                                                       Constructor<?> ctor,
                                                                       boolean keepEncoded)

Create a list of parameter models for a given resource method handler injectable constructor.

Parameters:
  `concreteClass` - concrete resource method handler implementation class.
  `declaringClass` - class where the method has been declared.
  `ctor` - injectable constructor of the resource method handler.
  `keepEncoded` - set to `true` to disable automatic decoding of all the constructor parameters. (See `Encoded`.
Returns:
  a list of constructor parameter models.

#### create

    public static <PARAMETER extends Parameter> List<PARAMETER> create(Class concreteClass,
                                                                       Class declaringClass,
                                                                       Method javaMethod,
                                                                       boolean keepEncoded)

Create a list of parameter models for a given Java method handling a resource method, sub-resource method or a sub-resource locator.

Parameters:
  `concreteClass` - concrete resource method handler implementation class.
  `declaringClass` - the class declaring the handling Java method.
  `javaMethod` - Java method handling a resource method, sub-resource method or a sub-resource locator.
  `keepEncoded` - set to `true` to disable automatic decoding of all the method parameters. (See `Encoded`.
Returns:
  a list of handling method parameter models.

#### overrideSource

    public static Parameter overrideSource(Parameter original,
                                           Parameter.Source source)

Create new parameter model by overriding `source` of the original parameter model.

Parameters:
  `original` - original parameter model.
  `source` - new overriding parameter source.
Returns:
  source-overridden copy of the original parameter.

#### isQualified

    public boolean isQualified()

Check if the parameter is `qualified`.

Overrides:
  `isQualified` in class `Parameter`
Returns:
  `true` if the parameter is qualified, `false` otherwise.