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
Abstract representation of an annotation model
- Author:
- Pete Muir
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationModel(EnhancedAnnotation<T> enhancedAnnotatedAnnotation) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheck(EnhancedAnnotation<T> annotatedAnnotation) jakarta.enterprise.inject.spi.AnnotatedType<T>Gets the annotated annotationprotected abstract Set<Class<? extends Annotation>>Gets the meta-annotation that should be presentGets the type of the annotationprotected voidinit(EnhancedAnnotation<T> annotatedAnnotation) Initializes the type and validates itprotected voidinitType(EnhancedAnnotation<T> annotatedAnnotation) Initializes the typeprotected voidinitValid(EnhancedAnnotation<T> annotatedAnnotation) Validates the data for correct annotationbooleanisValid()Indicates if the annotation is validtoString()Gets a string representation of the annotation model
-
Field Details
-
valid
protected boolean valid
-
-
Constructor Details
-
AnnotationModel
Constructor- Parameters:
type- The annotation type
-
-
Method Details
-
init
Initializes the type and validates it -
initType
Initializes the type -
initValid
Validates the data for correct annotation -
check
-
getRawType
Gets the type of the annotation- Returns:
- The type
-
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
Gets the annotated annotation- Returns:
- The annotation
-
toString
Gets a string representation of the annotation model
-