Package org.apache.webbeans.annotation
Class AnnotationManager
java.lang.Object
org.apache.webbeans.annotation.AnnotationManager
Manages annotation usage by classes in this application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckDecoratorResolverParams(Set<Type> apiTypes, Annotation... qualifiers) voidJavaEE components can not injectInjectionPoint.voidcheckInterceptorResolverParams(Annotation... interceptorBindings) voidvoidcheckQualifierConditions(Annotation... qualifierAnnots) voidcheckQualifierConditions(Set<Annotation> qualifierAnnots) This function obviously cannot check for duplicate annotations.voidcheckQualifiersParams(Set<Type> apiTypes, Annotation... qualifiers) voidcheckStereoTypeClass(Class<? extends Annotation> clazz, Annotation... annotations) Validates that given class obeys stereotype model defined by the specification.void<X> Annotation[]getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(jakarta.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod, Class<? extends Annotation> clazz) getDeclaredScopeAnnotation(Class<?> beanClass) <X> MethodgetDisposalWithGivenAnnotatedMethod(jakarta.enterprise.inject.spi.AnnotatedType<X> annotatedType, Type beanType, Annotation[] qualifiers) getInterceptorAnnotations(Set<Annotation> typeAnns) This method searches for all direct and indirect annotations which represent anInterceptorBinding.Collect the interceptor bindings from an array of annotations, including transitively defined interceptor bindings.Collect the interceptor bindings from an array of annotations, including transitively defined interceptor bindings.getMethodFirstParameterQualifierWithGivenAnnotation(Method method, Class<? extends Annotation> clazz) Gets the method first found parameter qualifiers.getQualifierAnnotations(Annotation... annotations) Gets the array of qualifier annotations on the given array.getRepeatableMethod(Class<?> type) Set<Class<? extends Annotation>>getStereotypeMetaAnnotations(Set<Class<? extends Annotation>> stereotypes) Same likegetStereotypeMetaAnnotations(java.util.Set)but with an arraySet<Class<? extends Annotation>>getStereotypes(Set<Class<? extends Annotation>> anns) Returns bean stereotypes.booleanIf any Annotations in the input is an interceptor binding annotation type then return true, false otherwise.booleanhasNamedOnStereoTypes(Set<Class<? extends Annotation>> stereotypes) Returns true if name exists,false otherwise.booleanbooleanhasStereoTypeMetaAnnotation(Set<Class<? extends Annotation>> anns) booleanisInterceptorBindingAnnotation(Class<? extends Annotation> clazz) Returns true if the annotation is defined in xml or annotated withInterceptorBindingor an InterceptorBinding registered viaBeforeBeanDiscovery.booleanisQualifierAnnotation(Class<? extends Annotation> clazz) Returns true if the annotation is defined in xml or annotated withQualifierfalse otherwise.booleanisStereoTypeAnnotation(Class<? extends Annotation> clazz) Returns true if the annotation is defined in xml or annotated withStereotypefalse otherwise.protected MethodresolveRepeatableMethod(Class<?> type)
-
Constructor Details
-
AnnotationManager
-
-
Method Details
-
getDeclaredScopeAnnotation
-
isInterceptorBindingAnnotation
Returns true if the annotation is defined in xml or annotated withInterceptorBindingor an InterceptorBinding registered viaBeforeBeanDiscovery. False otherwise.- Parameters:
clazz- type of the annotation- Returns:
- true if the annotation is defined in xml or annotated with
InterceptorBinding, false otherwise
-
getInterceptorAnnotations
This method searches for all direct and indirect annotations which represent anInterceptorBinding. InterceptorBindings in stereotypes will also be found!- Returns:
- the effective interceptor annotations of the array of given annotations
-
hasInterceptorBindingMetaAnnotation
If any Annotations in the input is an interceptor binding annotation type then return true, false otherwise.- Parameters:
anns- array of Annotations to check- Returns:
- true if one or moe of the input annotations are an interceptor binding annotation type false otherwise
-
getInterceptorBindingMetaAnnotations
Collect the interceptor bindings from an array of annotations, including transitively defined interceptor bindings.- Parameters:
anns- An array of annotations- Returns:
- an array of interceptor binding annotations, including the input and any transitively declared annotations
-
getInterceptorBindingMetaAnnotations
Collect the interceptor bindings from an array of annotations, including transitively defined interceptor bindings.- Parameters:
anns- An array of annotations- Returns:
- an array of interceptor binding annotations, including the input and any transitively declared annotations
-
isQualifierAnnotation
Returns true if the annotation is defined in xml or annotated withQualifierfalse otherwise.- Parameters:
clazz- type of the annotation- Returns:
- true if the annotation is defined in xml or annotated with
Qualifierfalse otherwise
-
getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation
public <X> Annotation[] getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(jakarta.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod, Class<? extends Annotation> clazz) -
getMethodFirstParameterQualifierWithGivenAnnotation
public Annotation[] getMethodFirstParameterQualifierWithGivenAnnotation(Method method, Class<? extends Annotation> clazz) Gets the method first found parameter qualifiers.- Parameters:
method- methodclazz- checking annotation- Returns:
- annotation array
-
getQualifierAnnotations
-
getQualifierAnnotations
Gets the array of qualifier annotations on the given array.- Parameters:
anns- annotation array- Returns:
- array containing qualifier anns
-
checkQualifierConditions
-
checkQualifierConditions
This function obviously cannot check for duplicate annotations. So this must have been done before!- Parameters:
qualifierAnnots-
-
checkQualifierConditions
-
isStereoTypeAnnotation
Returns true if the annotation is defined in xml or annotated withStereotypefalse otherwise.- Parameters:
clazz- type of the annotation- Returns:
- true if the annotation is defined in xml or annotated with
Stereotypefalse otherwise
-
hasStereoTypeMetaAnnotation
-
hasStereoTypeMetaAnnotation
-
getStereotypeMetaAnnotations
-
getStereotypeMetaAnnotations
public Set<Class<? extends Annotation>> getStereotypeMetaAnnotations(Set<Class<? extends Annotation>> stereotypes) Same likegetStereotypeMetaAnnotations(java.util.Set)but with an array -
getStereotypes
Returns bean stereotypes.- Returns:
- bean stereotypes
-
hasNamedOnStereoTypes
Returns true if name exists,false otherwise.- Returns:
- true if name exists
-
checkStereoTypeClass
Validates that given class obeys stereotype model defined by the specification.- Parameters:
clazz- stereotype class
-
checkInterceptorResolverParams
-
checkDecoratorResolverParams
-
checkQualifiersParams
-
getDisposalWithGivenAnnotatedMethod
public <X> Method getDisposalWithGivenAnnotatedMethod(jakarta.enterprise.inject.spi.AnnotatedType<X> annotatedType, Type beanType, Annotation[] qualifiers) -
checkInjectionPointForInjectInjectionPoint
JavaEE components can not injectInjectionPoint.- Parameters:
clazz- javaee component class info- Throws:
WebBeansConfigurationException- exception if condition is not applied
-
clearCaches
public void clearCaches() -
getRepeatableMethod
-
resolveRepeatableMethod
-