|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--scale.common.Root
This class is the top level class for all Scale classes that may be annotated or graphically displayed.
$Id: Root.java,v 1.14 2002/01/03 21:44:39 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Each instance has a unique id number associated with it.
Annotation,
Node,
Note, Serialized Form| Fields inherited from interface scale.common.DisplayNode |
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE |
| Constructor Summary | |
protected |
Root()
|
| Method Summary | |
void |
addAnnotation(Annotation a)
Adds an annotation to this node's annotation list. |
java.util.Enumeration |
allAnnotations()
Returns an enumeration of all the annotations associated with this node. |
java.util.Enumeration |
allMatchingAnnotations(java.lang.Object annotation_key)
Returns an enumeration of all the annotations of the given kind associated with this node. |
Annotation |
getAnnotation(java.lang.Object annotation_key)
Returns an arbitrary annotation of the indicated kind. |
java.lang.String |
getDisplayColorHint()
Return a String specifying the color to use for coloring this node in a graphical display. |
java.lang.String |
getDisplayName()
Return a unique label for graphical displays. |
java.lang.String |
getDisplayShapeHint()
Return a String specifying a shape to use when drawing this node in a graphical display. |
java.lang.String |
getDisplayString(java.lang.String v)
Convert a string to a form suitable for display. |
java.lang.String |
getDisplayText()
Return a String suitable for labeling this node in a graphical display. |
static int |
getNodeCount()
Return the number of nodes created so far. |
int |
getNodeID()
Return the unique node label. |
boolean |
hasAnnotation(java.lang.Object annotation_key)
Returns true if this node has the indicated kind of annotation. |
boolean |
hasEqualAnnotation(Annotation a)
Returns true if this node has an annotation equal to the given annotation. |
int |
hashCode()
Use the node ID as the hash code so that the order of processing is not affected by changes to the Java code. |
void |
removeAnnotation(Annotation a)
Delete the given annotation. |
void |
removeAnnotations(java.lang.Object key)
Delete all annotations which match the given key. |
java.lang.String |
toString()
|
java.lang.String |
toStringAnnotations()
Convert the annotations of this node to a string representation. |
java.lang.String |
toStringClass()
Convert the class name of this node to a string representation. |
java.lang.String |
toStringSpecial()
Return any special information of a node that is not a child or annotation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected Root()
| Method Detail |
public final int getNodeID()
public static final int getNodeCount()
public java.lang.String getDisplayName()
getDisplayName in interface DisplayNodepublic java.lang.String getDisplayText()
getDisplayText in interface DisplayNodepublic java.lang.String getDisplayColorHint()
getDisplayColorHint in interface DisplayNodepublic java.lang.String getDisplayShapeHint()
getDisplayShapeHint in interface DisplayNodepublic final void addAnnotation(Annotation a)
addAnnotation in interface AnnotationInterfacepublic final void removeAnnotation(Annotation a)
removeAnnotation in interface AnnotationInterfacepublic final void removeAnnotations(java.lang.Object key)
public final Annotation getAnnotation(java.lang.Object annotation_key)
getAnnotation in interface AnnotationInterfacescale.annot.AnnotationInterfaceannotation_key - the annotation keypublic final boolean hasAnnotation(java.lang.Object annotation_key)
hasAnnotation in interface AnnotationInterfacescale.annot.AnnotationInterfaceannotation_key - the annotation keypublic final boolean hasEqualAnnotation(Annotation a)
hasEqualAnnotation in interface AnnotationInterfacescale.annot.AnnotationInterfaceannotation_key - the annotation keypublic final java.util.Enumeration allAnnotations()
allAnnotations in interface AnnotationInterfacescale.annot.AnnotationInterfacepublic final java.util.Enumeration allMatchingAnnotations(java.lang.Object annotation_key)
allMatchingAnnotations in interface AnnotationInterfacescale.annot.AnnotationInterfacepublic final java.lang.String toStringAnnotations()
public java.lang.String toStringSpecial()
public final java.lang.String toStringClass()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getDisplayString(java.lang.String v)
v - the original string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||