|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.webbeans.util.AnnotationUtil
public final class AnnotationUtil
Utility class related with Annotation operations.
| Field Summary | |
|---|---|
static Set<Annotation> |
DEFAULT_AND_ANY_ANNOTATION
|
static Annotation[] |
EMPTY_ANNOTATION_ARRAY
|
static Object[] |
EMPTY_OBJECT_ARRAY
|
| Method Summary | ||
|---|---|---|
static Annotation[] |
asArray(Set<Annotation> set)
|
|
static
|
getAnnotatedMethodFirstParameterAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<T> clazz)
|
|
static
|
getAnnotatedMethodFirstParameterWithAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
|
|
static
|
getAnnotation(Annotation[] anns,
Class<T> annotation)
get the annotation of the given type from the array. |
|
static
|
getAnnotation(Set<Annotation> annotations,
Class<T> annotationClass)
Search in the given Set of Annotations for the one with the given AnnotationClass. |
|
static int |
getCdiAnnotationHashCode(Annotation annotation)
Computes a hash code for the specified cdi annoation. cdi annotations may either be qualifiers or interceptor bindings. |
|
static Class<?> |
getDeclaringClass(Annotation declaredAnnotation,
Class<?> typeHierarchy)
Returns the declaring class for the specified annotation, using the specified type hierarchy. |
|
static Annotation[] |
getMetaAnnotations(Annotation[] anns,
Class<? extends Annotation> metaAnnotation)
Returns a subset of annotations that are annotated with the specified meta-annotation |
|
static Type |
getTypeOfParameterWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
Get the Type of the method parameter which has the given annotation |
|
static
|
hasAnnotatedMethodMultipleParameterAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
|
|
static
|
hasAnnotatedMethodParameterAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
|
|
static boolean |
hasAnnotation(Annotation[] anns,
Class<? extends Annotation> annotation)
|
|
static boolean |
hasClassAnnotation(Class<?> clazz,
Class<? extends Annotation> annotation)
Check whether or not class contains the given annotation. |
|
static boolean |
hasMetaAnnotation(Annotation[] anns,
Class<? extends Annotation> metaAnnotation)
|
|
static boolean |
hasMethodAnnotation(Method method,
Class<? extends Annotation> clazz)
Check given annotation exist on the method. |
|
static Annotation |
hasOwbInjectableResource(Annotation[] annotations)
|
|
static boolean |
isCdiAnnotationEqual(Annotation annotation1,
Annotation annotation2)
Checks if the given cdi annotations are equal. cdi annotations may either be qualifiers or interceptor bindings. |
|
static boolean |
isDeclaringClass(Class<?> declaringClass,
Annotation declaredAnnotation)
Checks, if the given class declares the specified annotation |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Annotation[] EMPTY_ANNOTATION_ARRAY
public static final Object[] EMPTY_OBJECT_ARRAY
public static final Set<Annotation> DEFAULT_AND_ANY_ANNOTATION
| Method Detail |
|---|
public static boolean isDeclaringClass(Class<?> declaringClass,
Annotation declaredAnnotation)
public static Class<?> getDeclaringClass(Annotation declaredAnnotation,
Class<?> typeHierarchy)
public static boolean hasMethodAnnotation(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - annotation class
public static <X> boolean hasAnnotatedMethodParameterAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
public static <X> boolean hasAnnotatedMethodMultipleParameterAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
public static <X> Type getAnnotatedMethodFirstParameterWithAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
public static Type getTypeOfParameterWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
method - which need to be scannedclazz - the annotation to scan the method parameters for
null if not found.
public static <X,T extends Annotation> T getAnnotatedMethodFirstParameterAnnotation(AnnotatedMethod<X> annotatedMethod,
Class<T> clazz)
public static boolean isCdiAnnotationEqual(Annotation annotation1,
Annotation annotation2)
annotation1 - annotation2 -
public static int getCdiAnnotationHashCode(Annotation annotation)
annotation -
public static boolean hasClassAnnotation(Class<?> clazz,
Class<? extends Annotation> annotation)
clazz - class instanceannotation - annotation class
public static boolean hasMetaAnnotation(Annotation[] anns,
Class<? extends Annotation> metaAnnotation)
public static boolean hasAnnotation(Annotation[] anns,
Class<? extends Annotation> annotation)
public static <T extends Annotation> T getAnnotation(Annotation[] anns,
Class<T> annotation)
anns - annotation -
null if no such found.
public static Annotation[] getMetaAnnotations(Annotation[] anns,
Class<? extends Annotation> metaAnnotation)
anns - metaAnnotation -
public static <T extends Annotation> T getAnnotation(Set<Annotation> annotations,
Class<T> annotationClass)
annotations - to scanannotationClass - to search for
null if not found.public static Annotation hasOwbInjectableResource(Annotation[] annotations)
public static Annotation[] asArray(Set<Annotation> set)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||