public class AnnotatedMethod extends Object implements AnnotatedElement
| Constructor and Description |
|---|
AnnotatedMethod(Method method)
Create annotated method instance from the
Java method. |
| Modifier and Type | Method and Description |
|---|---|
<T extends Annotation> |
getAnnotation(Class<T> annotationType) |
Annotation[] |
getAnnotations() |
Annotation[] |
getDeclaredAnnotations() |
Method |
getDeclaredMethod()
Get the underlying declared Java method.
|
Type[] |
getGenericParameterTypes()
Get generic method parameter types.
|
<T extends Annotation> |
getMetaMethodAnnotations(Class<T> annotation)
Get all instances of the specified meta-annotation type found on the method
annotations.
|
Method |
getMethod()
Get the underlying Java method.
|
Annotation[][] |
getParameterAnnotations()
Get method parameter annotations.
|
Class<?>[] |
getParameterTypes()
Get method parameter types.
|
TypeVariable<Method>[] |
getTypeParameters()
Get method type parameters.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByTypepublic AnnotatedMethod(Method method)
Java method.method - Java method.public Method getMethod()
public Method getDeclaredMethod()
getMethod.public Annotation[][] getParameterAnnotations()
public Class<?>[] getParameterTypes()
Method.getParameterTypes().public TypeVariable<Method>[] getTypeParameters()
Method.getTypeParameters().public Type[] getGenericParameterTypes()
Method.getGenericParameterTypes().public <T extends Annotation> List<T> getMetaMethodAnnotations(Class<T> annotation)
T - meta-annotation type.annotation - meta-annotation class to be searched for.public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
isAnnotationPresent in interface AnnotatedElementpublic <T extends Annotation> T getAnnotation(Class<T> annotationType)
getAnnotation in interface AnnotatedElementpublic Annotation[] getAnnotations()
getAnnotations in interface AnnotatedElementpublic Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations in interface AnnotatedElementCopyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.