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 Details

    • valid

      protected boolean valid
  • Constructor Details

    • AnnotationModel

      public AnnotationModel(EnhancedAnnotation<T> enhancedAnnotatedAnnotation)
      Constructor
      Parameters:
      type - The annotation type
  • Method Details

    • 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)
    • getRawType

      public Class<T> getRawType()
      Gets the type of the annotation
      Returns:
      The type
    • 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
    • toString

      public String toString()
      Gets a string representation of the annotation model
      Overrides:
      toString in class Object
      Returns:
      The string representation