Class AnnotatedMethod
java.lang.Object
org.glassfish.jersey.server.model.AnnotatedMethod
- All Implemented Interfaces:
AnnotatedElement
Annotated method representation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Method
private final Method
private static final Set
<Class<? extends Annotation>> private static final Set
<Class<? extends Annotation>> private final Annotation[]
private static final Set
<Class<? extends Annotation>> private final Annotation[][]
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotatedMethod
(Method method) Create annotated method instance from theJava method
. -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
annotationNotInList
(Class<? extends Annotation> ca, List<Annotation> la) private static <T> List
<T> asList
(T... ts) private static Method
findAnnotatedMethod
(Class<?> c, Method m) private static Method
<T extends Annotation>
TgetAnnotation
(Class<T> annotationType) (package private) Method
Get the underlying declared Java method.Type[]
Get generic method parameter types.<T extends Annotation>
List<T> getMetaMethodAnnotations
(Class<T> annotation) Get all instances of the specified meta-annotation type found on the method annotations.Get the underlying Java method.Annotation[][]
Get method parameter annotations.Class<?>[]
Get method parameter types.private static Set
<Class<? extends Annotation>> getSet
(Class<? extends Annotation>... cs) Get method type parameters.private static boolean
private static boolean
private static boolean
private static boolean
boolean
isAnnotationPresent
(Class<? extends Annotation> annotationType) private static Annotation[]
mergeMethodAnnotations
(Method m, Method am) private static Annotation[][]
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
Field Details
-
METHOD_META_ANNOTATIONS
-
METHOD_ANNOTATIONS
-
PARAMETER_ANNOTATIONS
-
m
-
am
-
methodAnnotations
-
parameterAnnotations
-
-
Constructor Details
-
AnnotatedMethod
Create annotated method instance from theJava method
.- Parameters:
method
- Java method.
-
-
Method Details
-
getSet
@SafeVarargs private static Set<Class<? extends Annotation>> getSet(Class<? extends Annotation>... cs) -
getMethod
Get the underlying Java method.- Returns:
- the underlying Java method.
-
getDeclaredMethod
Method getDeclaredMethod()Get the underlying declared Java method. This method overrides or is the same as the one retrieved bygetMethod
.- Returns:
- the underlying declared Java method.
-
getParameterAnnotations
Get method parameter annotations.- Returns:
- method parameter annotations.
-
getParameterTypes
Get method parameter types. See alsoMethod.getParameterTypes()
.- Returns:
- method parameter types.
-
getTypeParameters
Get method type parameters. See alsoMethod.getTypeParameters()
.- Returns:
- method type parameters.
-
getGenericParameterTypes
Get generic method parameter types. See alsoMethod.getGenericParameterTypes()
.- Returns:
- generic method parameter types.
-
getMetaMethodAnnotations
Get all instances of the specified meta-annotation type found on the method annotations.- Type Parameters:
T
- meta-annotation type.- Parameters:
annotation
- meta-annotation class to be searched for.- Returns:
- meta-annotation instances of a given type annotating the method annotations.
-
toString
-
isAnnotationPresent
- Specified by:
isAnnotationPresent
in interfaceAnnotatedElement
-
getAnnotation
- Specified by:
getAnnotation
in interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotations
in interfaceAnnotatedElement
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
-
mergeMethodAnnotations
-
mergeParameterAnnotations
-
annotationNotInList
-
findAnnotatedMethod
-
findAnnotatedMethod
-
hasAnnotations
-
hasMetaMethodAnnotations
-
hasMethodAnnotations
-
hasParameterAnnotations
-
asList
-