org.jboss.weld.metadata.cache
Class AnnotationModel<T extends Annotation>

java.lang.Object
  extended by org.jboss.weld.metadata.cache.AnnotationModel<T>
Direct Known Subclasses:
InterceptorBindingModel, QualifierModel, ScopeModel, StereotypeModel

public abstract class AnnotationModel<T extends Annotation>
extends Object

Abstract representation of an annotation model

Author:
Pete Muir

Field Summary
protected  boolean valid
           
 
Constructor Summary
AnnotationModel(Class<T> type, ClassTransformer transformer)
          Constructor
 
Method Summary
protected  void check()
           
 WeldAnnotation<T> getAnnotatedAnnotation()
          Gets the annotated annotation
protected abstract  Set<Class<? extends Annotation>> getMetaAnnotationTypes()
          Gets the meta-annotation that should be present
 Class<T> getRawType()
          Gets the type of the annotation
protected  void init()
          Initializes the type and validates it
protected  void initType()
          Initializes the type
protected  void initValid()
          Validates the data for correct annotation
 boolean isValid()
          Indicates if the annotation is valid
 String toString()
          Gets a string representation of the annotation model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

valid

protected boolean valid
Constructor Detail

AnnotationModel

public AnnotationModel(Class<T> type,
                       ClassTransformer transformer)
Constructor

Parameters:
type - The annotation type
Method Detail

init

protected void init()
Initializes the type and validates it


initType

protected void initType()
Initializes the type


initValid

protected void initValid()
Validates the data for correct annotation


check

protected void check()

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 WeldAnnotation<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


Copyright © 2013 Seam Framework. All Rights Reserved.