|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.common.Root
public abstract class Root
This class is the top level class for all Scale classes that may be annotated or graphically displayed.
$Id: Root.java,v 1.22 2007-08-13 12:32:02 burrill Exp $
Copyright 2008 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| Constructor Summary | |
|---|---|
protected |
Root()
|
| Method Summary | |
|---|---|
void |
addAnnotation(Annotation a)
Adds an annotation to this node's annotation list. |
java.util.Enumeration<Annotation> |
allAnnotations()
Returns an enumeration of all the annotations associated with this node. |
java.util.Enumeration<Annotation> |
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. |
DColor |
getDisplayColorHint()
Return a String specifying the color to use for coloring this node in a graphical display. |
java.lang.String |
getDisplayLabel()
Return a String suitable for labeling this node in a graphical display. |
java.lang.String |
getDisplayName()
Return a unique label for graphical displays. |
DShape |
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. |
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. |
void |
trace(int id,
java.lang.String msg)
Print out a trace message to stdout if the node id of this node matches. |
void |
trace(int id,
java.lang.String msg,
boolean stkTrace)
Print out a trace message to stdout if the node id of this node matches. |
void |
trace(int id,
java.lang.String msg,
boolean stkTrace,
java.io.PrintStream str)
Print out a trace message to specified stream if the node id of this node matches. |
| 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 final void trace(int id,
java.lang.String msg)
id - is the node id to matchmsg - is the beginning message text
public final void trace(int id,
java.lang.String msg,
boolean stkTrace)
id - is the node id to matchmsg - is the beginning message textstkTrace - is true for a display of the Java stack
public final void trace(int id,
java.lang.String msg,
boolean stkTrace,
java.io.PrintStream str)
id - is the node id to matchmsg - is the beginning message textstkTrace - is true for a stack tracestr - is the stream to usepublic static final int getNodeCount()
public java.lang.String getDisplayName()
getDisplayName in interface DisplayNodepublic java.lang.String getDisplayLabel()
getDisplayLabel in interface DisplayNodepublic DColor getDisplayColorHint()
getDisplayColorHint in interface DisplayNodeDColorpublic DShape getDisplayShapeHint()
getDisplayShapeHint in interface DisplayNodeDShapepublic 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 AnnotationInterfaceannotation_key - the annotation key
public final boolean hasAnnotation(java.lang.Object annotation_key)
hasAnnotation in interface AnnotationInterfaceannotation_key - the annotation key
public final boolean hasEqualAnnotation(Annotation a)
hasEqualAnnotation in interface AnnotationInterfacea - the annotation keypublic final java.util.Enumeration<Annotation> allAnnotations()
allAnnotations in interface AnnotationInterfacepublic final java.util.Enumeration<Annotation> allMatchingAnnotations(java.lang.Object annotation_key)
allMatchingAnnotations in interface 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||