public final class Annotations extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Annotation> |
getAnnotation(Class<?> cls,
Class<T> annotationClass)
Searches for annotation on provided class, and if not found for the
superclass.
|
static <T extends Annotation> |
getAnnotation(Method method,
Class<T> annotationClass)
Searches for annotation on provided method, and if not found for any
inherited methods up from the superclass.
|
static <T extends Annotation> |
getDeclaredAnnotation(Class<?> cls,
Class<T> annotationClass) |
static Annotation[][] |
getParameterAnnotations(Method method)
Searches for parameter annotations on provided method, and if not found
for any inherited methods up from the superclass.
|
static boolean |
isAnnotationPresent(Method method,
Class<? extends Annotation> annotationClass)
Searches for annotation on provided method, and if not found for any
inherited methods up from the superclass.
|
static boolean |
isString(Class<?> cls)
For convenience of the several annotations that apply only to
Strings. |
public static boolean isString(Class<?> cls)
Strings.public static <T extends Annotation> T getDeclaredAnnotation(Class<?> cls, Class<T> annotationClass)
public static <T extends Annotation> T getAnnotation(Class<?> cls, Class<T> annotationClass)
Added to allow bytecode-mangling libraries such as CGLIB to be supported.
public static <T extends Annotation> T getAnnotation(Method method, Class<T> annotationClass)
Added to allow bytecode-mangling libraries such as CGLIB to be supported.
public static boolean isAnnotationPresent(Method method, Class<? extends Annotation> annotationClass)
Added to allow bytecode-mangling libraries such as CGLIB to be supported.
public static Annotation[][] getParameterAnnotations(Method method)
Added to allow bytecode-mangling libraries such as CGLIB to be supported.
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.