Class AnnotatedMethod
java.lang.Object
org.glassfish.jersey.server.model.AnnotatedMethod
- All Implemented Interfaces:
AnnotatedElement
Annotated method representation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Methodprivate final Methodprivate 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 booleanannotationNotInList(Class<? extends Annotation> ca, List<Annotation> la) private static <T> List<T> asList(T... ts) private static MethodfindAnnotatedMethod(Class<?> c, Method m) private static Method<T extends Annotation>
TgetAnnotation(Class<T> annotationType) (package private) MethodGet 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 booleanprivate static booleanprivate static booleanprivate static booleanbooleanisAnnotationPresent(Class<? extends Annotation> annotationType) private static Annotation[]mergeMethodAnnotations(Method m, Method am) private static Annotation[][]toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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
-
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:
isAnnotationPresentin interfaceAnnotatedElement
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement
-
mergeMethodAnnotations
-
mergeParameterAnnotations
-
annotationNotInList
-
findAnnotatedMethod
-
findAnnotatedMethod
-
hasAnnotations
-
hasMetaMethodAnnotations
-
hasMethodAnnotations
-
hasParameterAnnotations
-
asList
-