Package org.glassfish.jersey.model
Class AnnotatedMethod
java.lang.Object
org.glassfish.jersey.model.AnnotatedMethod
- All Implemented Interfaces:
AnnotatedElement
- Direct Known Subclasses:
AnnotatedMethod
Annotated method representation.
- Author:
- Paul Sandoz
-
Constructor Summary
ConstructorDescriptionAnnotatedMethod
(Method method) Create annotated method instance from theJava method
. -
Method Summary
Modifier and TypeMethodDescription<T extends Annotation>
TgetAnnotation
(Class<T> annotationType) 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.Get method type parameters.boolean
isAnnotationPresent
(Class<? extends Annotation> annotationType) 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
-
Constructor Details
-
AnnotatedMethod
Create annotated method instance from theJava method
.- Parameters:
method
- Java method.
-
-
Method Details
-
getMethod
Get the underlying Java method.- Returns:
- the underlying Java 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
-