Package org.jboss.weld.metadata.cache
Class AnnotationModel<T extends Annotation>
- java.lang.Object
-
- org.jboss.weld.metadata.cache.AnnotationModel<T>
-
- Direct Known Subclasses:
AbstractBindingModel
,ScopeModel
,StereotypeModel
public abstract class AnnotationModel<T extends Annotation> extends Object
Abstract representation of an annotation model- Author:
- Pete Muir
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
valid
-
Constructor Summary
Constructors Constructor Description AnnotationModel(EnhancedAnnotation<T> enhancedAnnotatedAnnotation)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
check(EnhancedAnnotation<T> annotatedAnnotation)
jakarta.enterprise.inject.spi.AnnotatedType<T>
getAnnotatedAnnotation()
Gets the annotated annotationprotected abstract Set<Class<? extends Annotation>>
getMetaAnnotationTypes()
Gets the meta-annotation that should be presentClass<T>
getRawType()
Gets the type of the annotationprotected void
init(EnhancedAnnotation<T> annotatedAnnotation)
Initializes the type and validates itprotected void
initType(EnhancedAnnotation<T> annotatedAnnotation)
Initializes the typeprotected void
initValid(EnhancedAnnotation<T> annotatedAnnotation)
Validates the data for correct annotationboolean
isValid()
Indicates if the annotation is validString
toString()
Gets a string representation of the annotation model
-
-
-
Constructor Detail
-
AnnotationModel
public AnnotationModel(EnhancedAnnotation<T> enhancedAnnotatedAnnotation)
Constructor- Parameters:
type
- The annotation type
-
-
Method Detail
-
init
protected void init(EnhancedAnnotation<T> annotatedAnnotation)
Initializes the type and validates it
-
initType
protected void initType(EnhancedAnnotation<T> annotatedAnnotation)
Initializes the type
-
initValid
protected void initValid(EnhancedAnnotation<T> annotatedAnnotation)
Validates the data for correct annotation
-
check
protected void check(EnhancedAnnotation<T> annotatedAnnotation)
-
getMetaAnnotationTypes
protected abstract Set<Class<? extends Annotation>> getMetaAnnotationTypes()
Gets the meta-annotation that should be present- Returns:
-
isValid
public boolean isValid()
Indicates if the annotation is valid- Returns:
- True if valid, false otherwise
-
getAnnotatedAnnotation
public jakarta.enterprise.inject.spi.AnnotatedType<T> getAnnotatedAnnotation()
Gets the annotated annotation- Returns:
- The annotation
-
-