public class Annotations extends Object
Annotation operations.
| Constructor and Description |
|---|
Annotations() |
| Modifier and Type | Method and Description |
|---|---|
static <A extends Annotation> |
getAnnotation(Annotation a,
Class<A> type)
Inspect annotation a for a specific type of annotation.
|
static <A extends Annotation> |
getAnnotation(Class<?> c,
Class<A> type)
Inspect class c for a specific type of annotation.
|
static <A extends Annotation> |
getAnnotation(Method m,
Class<A> type)
Inspect method m for a specific type of annotation.
|
static boolean |
isAnnotationPresent(Class<?> c,
Class<? extends Annotation> type)
Discover if a Class c has been annotated with type.
|
static boolean |
isAnnotationPresent(Method m,
Class<? extends Annotation> type)
Discover if a Method m has been annotated with type.
|
public static boolean isAnnotationPresent(Method m, Class<? extends Annotation> type)
m - The method to inspect.type - The targeted annotation classpublic static boolean isAnnotationPresent(Class<?> c, Class<? extends Annotation> type)
Stereotype.c - The class to inspect.type - The targeted annotation classpublic static <A extends Annotation> A getAnnotation(Method m, Class<A> type)
Stereotype.m - The method to inspect.type - The targeted annotation classpublic static <A extends Annotation> A getAnnotation(Annotation a, Class<A> type)
Stereotype.m - The method to inspect.type - The targeted annotation classpublic static <A extends Annotation> A getAnnotation(Class<?> c, Class<A> type)
Stereotype.c - The class to inspect.type - The targeted annotation classCopyright © 2014 JBoss by Red Hat. All rights reserved.