public class AnnotationUtil
extends java.lang.Object
Constructor and Description |
---|
AnnotationUtil() |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.annotation.Annotation> |
annotation(java.lang.annotation.Annotation annotation,
java.lang.Class<T> tagClass)
Returns the
Annotation tagged on another annotation instance |
static <T extends java.lang.annotation.Annotation> |
classOf(java.lang.annotation.Annotation annotation)
Deprecated.
|
static <T extends java.lang.annotation.Annotation> |
declaredAnnotation(java.lang.Class c,
java.lang.Class<T> annoClass) |
static <T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<?> targetClass,
java.lang.Class<T> annotationClass) |
public static <T extends java.lang.annotation.Annotation> T declaredAnnotation(java.lang.Class c, java.lang.Class<T> annoClass)
public static <T extends java.lang.annotation.Annotation> T annotation(java.lang.annotation.Annotation annotation, java.lang.Class<T> tagClass)
Returns the Annotation
tagged on another annotation instance
T
- the generic type of the expected annotationannotation
- the annotation instancetagClass
- the expected annotation classtagClass
@Deprecated public static <T extends java.lang.annotation.Annotation> java.lang.Class<T> classOf(java.lang.annotation.Annotation annotation)
Note this method is deprecated. Please use Annotation.annotationType()
instead
Returns the class of an annotation instance
T
- the generic type of the annotationannotation
- the annotation instancepublic static <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<?> targetClass, java.lang.Class<T> annotationClass)
Copyright © 2014–2017 ActFramework. All rights reserved.