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, wait
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
public 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 AnnotatedElement
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
getAnnotation
in interface AnnotatedElement
public Annotation[] getAnnotations()
getAnnotations
in interface AnnotatedElement
public Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotatedElement
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.