public class Parameter extends Object implements AnnotatedElement
| Modifier and Type | Class and Description |
|---|---|
static class |
Parameter.Source
Parameter injection sources type.
|
| Modifier and Type | Method and Description |
|---|---|
static Parameter |
create(Class concreteClass,
Class declaringClass,
boolean keepEncoded,
Class<?> rawType,
Type type,
Annotation[] annotations)
Create a parameter model.
|
static 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 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.
|
boolean |
equals(Object o) |
<T extends Annotation> |
getAnnotation(Class<T> annotationClass) |
Annotation[] |
getAnnotations() |
Annotation[] |
getDeclaredAnnotations() |
String |
getDefaultValue()
Get the default parameter value.
|
Class<?> |
getRawType()
Get raw type information for the parameter.
|
Parameter.Source |
getSource()
Get the parameter value source type.
|
Annotation |
getSourceAnnotation()
Get the parameter source annotation.
|
String |
getSourceName()
Get the parameter source name, i.e.
|
Type |
getType()
Get generic type information for the parameter.
|
boolean |
hasDefaultValue()
Check if the parameter has a default value set.
|
int |
hashCode() |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass) |
boolean |
isEncoded()
If
true, the injected parameter value should remain encoded. |
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. |
String |
toString() |
public static Parameter create(Class concreteClass, Class declaringClass, boolean keepEncoded, Class<?> rawType, Type type, Annotation[] annotations)
concreteClass - concrete resource method handler implementation class.declaringClass - declaring class of the method the parameter belongs to.keepEncoded - set to true to disable automatic decoding
of all the constructor parameters. (See Encoded.rawType - raw Java parameter type.type - generic Java parameter type.annotations - parameter annotations.public static List<Parameter> create(Class concreteClass, Class declaringClass, Constructor<?> ctor, boolean keepEncoded)
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.public static List<Parameter> create(Class concreteClass, Class declaringClass, Method javaMethod, boolean keepEncoded)
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.public static Parameter overrideSource(Parameter original, Parameter.Source source)
source
of the original parameter model.original - original parameter model.source - new overriding parameter source.public Annotation getSourceAnnotation()
public Parameter.Source getSource()
public String getSourceName()
public boolean isEncoded()
true, the injected parameter value should remain encoded.true if the parameter value should remain encoded,
false otherwise.public boolean hasDefaultValue()
true if the default parameter value has been set,
false otherwise.public String getDefaultValue()
null if no default value has
been set for the parameter.public Class<?> getRawType()
public Type getType()
public boolean isQualified()
qualified.true if the parameter is qualified, false otherwise.public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent in interface AnnotatedElementpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass)
getAnnotation in interface AnnotatedElementpublic Annotation[] getAnnotations()
getAnnotations in interface AnnotatedElementpublic Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations in interface AnnotatedElementCopyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.