|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Defins the operations required of a class in order to use annotations.
$Id: AnnotationInterface.java,v 1.12 2002/01/03 21:41:26 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Each node contains a container of annotations that have been associated with it. For the key to retrieve annotations, we use the value returned by the static method Annotation.annotationKey().
The goal of this interface is to make sure that details about how annotations are actually managed stay hidden. The interface provides only very general container operations, plus a few specialized routines unique to annotations.
Annotation| Method Summary | |
void |
addAnnotation(Annotation a)
Adds an annotation to this node's annotation list. |
java.util.Enumeration |
allAnnotations()
|
java.util.Enumeration |
allMatchingAnnotations(java.lang.Object annotation_key)
|
Annotation |
getAnnotation(java.lang.Object annotation_key)
Returns a single instance of the annotation with the given key. |
boolean |
hasAnnotation(java.lang.Object annotation_key)
|
boolean |
hasEqualAnnotation(Annotation a)
|
void |
removeAnnotation(Annotation annotation)
Delete all annotations which match the key of the given Annotation. |
| Method Detail |
public void addAnnotation(Annotation a)
public void removeAnnotation(Annotation annotation)
public Annotation getAnnotation(java.lang.Object annotation_key)
annotation_key - the annotation keypublic boolean hasAnnotation(java.lang.Object annotation_key)
annotation_key - the annotation keypublic boolean hasEqualAnnotation(Annotation a)
annotation_key - the annotation keypublic java.util.Enumeration allAnnotations()
public java.util.Enumeration allMatchingAnnotations(java.lang.Object annotation_key)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||