|
||||||||||
| 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 Annotation[] |
EMPTY_ANNOTATION_ARRAY
|
static Object[] |
EMPTY_OBJECT_ARRAY
|
| Method Summary | ||
|---|---|---|
static
|
getAnnotatedMethodFirstParameterAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<T> clazz)
|
|
static
|
getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
Deprecated. |
|
static
|
getAnnotatedMethodFirstParameterWithAnnotation(javax.enterprise.inject.spi.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 Annotation[] |
getAnnotationsFromSet(Set<Annotation> set)
|
|
static Type[] |
getConstructorParameterGenericTypesWithGivenAnnotation(Constructor<?> constructor,
Class<? extends Annotation> clazz)
|
|
static Annotation[] |
getInterceptorBindingMetaAnnotations(Annotation[] anns)
Deprecated. |
|
static Annotation[] |
getMetaAnnotations(Annotation[] anns,
Class<? extends Annotation> metaAnnotation)
Returns a subset of annotations that are annotated with the specified meta-annotation |
|
static
|
getMethodFirstParameterAnnotation(Method method,
Class<T> clazz)
Gets the method first found parameter annotation with given type. |
|
static Annotation[] |
getMethodFirstParameterQualifierWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
Deprecated. |
|
static Class<?> |
getMethodFirstParameterTypeClazzWithAnnotation(Method method,
Class<? extends Annotation> clazz)
|
|
static Type |
getMethodFirstParameterWithAnnotation(Method method,
Class<? extends Annotation> clazz)
Gets the method first found parameter type that is annotated with the given annotation. |
|
static Type[] |
getMethodParameterGenericTypesWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
|
|
static Method[] |
getMethodsWithParameterAnnotation(Class<?> clazz,
Class<? extends Annotation> annotation)
Gets array of methods that has parameter with given annotation type. |
|
static Annotation[] |
getQualifierAnnotations(Annotation... annotations)
Deprecated. |
|
static Annotation[] |
getRealizesGenericAnnotations(Class<?> clazz,
Annotation[] anns)
Deprecated. |
|
static Annotation[] |
getStereotypeMetaAnnotations(Annotation[] anns)
Deprecated. |
|
static Type |
getTypeOfParameterWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
Get the Type of the method parameter which has the given annotation |
|
static
|
hasAnnotatedMethodMultipleParameterAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
|
|
static
|
hasAnnotatedMethodParameterAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
|
|
static boolean |
hasAnnotation(Annotation[] anns,
Class<? extends Annotation> annotation)
|
|
static boolean |
hasAnyQualifier(javax.enterprise.inject.spi.Bean<?> bean)
Returns true if any binding exist |
|
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 boolean |
hasMethodMultipleParameterAnnotation(Method method,
Class<? extends Annotation> clazz)
Check given annotation exist in the multiple parameter of the given method. |
|
static boolean |
hasMethodParameterAnnotation(Method method,
Class<? extends Annotation> clazz)
Check given annotation exist in the any parameter of the given method. |
|
static boolean |
hasMethodParameterAnnotationCrossRef(Method method,
Class<? extends Annotation> clazz)
Check given annotation cross ref exist in the any parameter of the given method. |
|
static Annotation |
hasOwbInjectableResource(Annotation[] annotations)
|
|
static boolean |
hasStereoTypeMetaAnnotation(Annotation[] anns)
Deprecated. |
|
static boolean |
isInterceptorBindingAnnotation(Class<? extends Annotation> clazz)
Deprecated. |
|
static boolean |
isQualifierEqual(Annotation qualifier1,
Annotation qualifier2)
Checks if the given qualifiers are equal. |
|
static boolean |
isStereoTypeAnnotation(Class<? extends Annotation> clazz)
Deprecated. |
|
| 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
| Method Detail |
|---|
public static boolean hasMethodAnnotation(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - annotation class
public static boolean hasMethodParameterAnnotation(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - checking annotation
public static <X> boolean hasAnnotatedMethodParameterAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
public static Type[] getMethodParameterGenericTypesWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
public static Type[] getConstructorParameterGenericTypesWithGivenAnnotation(Constructor<?> constructor,
Class<? extends Annotation> clazz)
public static boolean hasMethodMultipleParameterAnnotation(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - checking annotation
public static <X> boolean hasAnnotatedMethodMultipleParameterAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
public static Type getMethodFirstParameterWithAnnotation(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - checking annotation
public static <X> Type getAnnotatedMethodFirstParameterWithAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
@Deprecated
public static <X> Annotation[] getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<? extends Annotation> clazz)
public static Class<?> getMethodFirstParameterTypeClazzWithAnnotation(Method method,
Class<? extends Annotation> clazz)
@Deprecated
public static Annotation[] getMethodFirstParameterQualifierWithGivenAnnotation(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - checking annotation
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 <T extends Annotation> T getMethodFirstParameterAnnotation(Method method,
Class<T> clazz)
method - methodclazz - checking annotation
public static <X,T extends Annotation> T getAnnotatedMethodFirstParameterAnnotation(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod,
Class<T> clazz)
public static boolean hasMethodParameterAnnotationCrossRef(Method method,
Class<? extends Annotation> clazz)
method - methodclazz - checking annotation
public static boolean isQualifierEqual(Annotation qualifier1,
Annotation qualifier2)
qualifier1 - qualifier2 -
@Deprecated public static Annotation[] getQualifierAnnotations(Annotation... annotations)
annotations - annotation array
public static Method[] getMethodsWithParameterAnnotation(Class<?> clazz,
Class<? extends Annotation> annotation)
clazz - class for checkannotation - for check
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 boolean hasAnyQualifier(javax.enterprise.inject.spi.Bean<?> bean)
bean - bean
public static Annotation hasOwbInjectableResource(Annotation[] annotations)
@Deprecated public static boolean isInterceptorBindingAnnotation(Class<? extends Annotation> clazz)
InterceptorBinding false otherwise.
clazz - type of the annotation
InterceptorBinding false otherwise@Deprecated public static Annotation[] getInterceptorBindingMetaAnnotations(Annotation[] anns)
anns - An array of annotations
@Deprecated public static Annotation[] getStereotypeMetaAnnotations(Annotation[] anns)
@Deprecated public static boolean hasStereoTypeMetaAnnotation(Annotation[] anns)
@Deprecated public static boolean isStereoTypeAnnotation(Class<? extends Annotation> clazz)
Stereotype false otherwise.
clazz - type of the annotation
Stereotype false otherwise
@Deprecated
public static Annotation[] getRealizesGenericAnnotations(Class<?> clazz,
Annotation[] anns)
clazz - realized definition classanns - binding annotations arraypublic static Annotation[] getAnnotationsFromSet(Set<Annotation> set)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||