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