public interface MetaAnnotations
| Modifier and Type | Method and Description |
|---|---|
void |
addContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
boolean isNormal,
java.lang.Class<? extends AlterableContext> contextClass)
Registers custom context for given
scopeAnnotation and given contextClass. |
void |
addContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends AlterableContext> contextClass)
Registers custom context for given
scopeAnnotation and given contextClass. |
ClassConfig |
addInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Registers
annotation as an interceptor binding annotation. |
ClassConfig |
addQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Registers
annotation as a qualifier annotation. |
ClassConfig |
addStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Registers
annotation as a stereotype annotation. |
ClassConfig addQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
annotation as a qualifier annotation. Only makes sense if the annotation
is not meta-annotated @Qualifier.
Returns a class configurator object that allows transforming meta-annotations
on the annotation.
annotation - annotation typenullClassConfig addInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
annotation as an interceptor binding annotation. Only makes sense if the annotation
is not meta-annotated @InterceptorBinding.
Returns a class configurator object that allows transforming meta-annotations
on the annotation.
annotation - annotation typenullClassConfig addStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
annotation as a stereotype annotation. Only makes sense if the annotation
is not meta-annotated @Stereotype.
Returns a class configurator object that allows transforming meta-annotations
on the annotation.
annotation - annotation typenullvoid addContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends AlterableContext> contextClass)
scopeAnnotation and given contextClass.
CDI container will create an instance of the context class once to obtain the context object.
The context class must be public and have a public zero-parameter constructor;
it must not be a bean.
Whether the scope is normal is discovered from the scope annotation. This means that the scope
annotation must be meta-annotated either @NormalScope
or @Scope.
scopeAnnotation - the scope annotation type, must not be nullcontextClass - the context class, must not be nulljava.lang.IllegalArgumentException - if the scopeAnnotation is not meta-annotated @NormalScope
or @Scopevoid addContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
boolean isNormal,
java.lang.Class<? extends AlterableContext> contextClass)
scopeAnnotation and given contextClass.
CDI container will create an instance of the context class once to obtain the context object.
The context class must be public and have a public zero-parameter constructor;
it must not be a bean.
The isNormal parameter determines whether the scope is a normal scope or a pseudo-scope.
scopeAnnotation - the scope annotation type, must not be nullisNormal - whether the scope is normalcontextClass - the context class, must not be null