org.jboss.webbeans.model
Class AnnotationModel<T extends java.lang.annotation.Annotation>

java.lang.Object
  extended by org.jboss.webbeans.model.AnnotationModel<T>
Direct Known Subclasses:
BindingTypeModel, ScopeModel, StereotypeModel

public abstract class AnnotationModel<T extends java.lang.annotation.Annotation>
extends java.lang.Object

Abstract representation of an annotation model

Author:
Pete Muir

Constructor Summary
AnnotationModel(java.lang.Class<T> type)
          Constructor
 
Method Summary
protected  AnnotatedAnnotation<T> getAnnotatedAnnotation()
          Gets the annotated annotation
protected abstract  java.lang.Class<? extends java.lang.annotation.Annotation> getMetaAnnotation()
          Gets the meta-annotation that should be present
 java.lang.Class<T> getType()
          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
 java.lang.String toDetailedString()
           
 java.lang.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
 

Constructor Detail

AnnotationModel

public AnnotationModel(java.lang.Class<T> type)
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


getType

public java.lang.Class<T> getType()
Gets the type of the annotation

Returns:
The type

getMetaAnnotation

protected abstract java.lang.Class<? extends java.lang.annotation.Annotation> getMetaAnnotation()
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

protected AnnotatedAnnotation<T> getAnnotatedAnnotation()
Gets the annotated annotation

Returns:
The annotation

toString

public java.lang.String toString()
Gets a string representation of the annotation model

Overrides:
toString in class java.lang.Object
Returns:
The string representation

toDetailedString

public java.lang.String toDetailedString()


Copyright © 2008. All Rights Reserved.