|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--scale.common.Root
|
+--scale.clef.Node
|
+--scale.clef.expr.Expression
This is the base class for expressions such as add, subscript, etc.
$Id: Expression.java,v 1.55 2002/01/03 21:43:05 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
| Fields inherited from interface scale.common.DisplayNode |
ANNO, CLEF, DD, DEFUSE, DOM, EXPR, MAYUSE, TYPE |
| Constructor Summary | |
Expression(Type type)
|
|
| Method Summary | |
long |
canonical()
Return a unique value representing this particular expression. |
boolean |
equivalent(java.lang.Object exp)
Return true if the two expressions are equivalent. |
protected void |
finalize()
Keep the count of instances up-to-date. |
java.lang.Object |
getConstantValue()
Return the constant value of the expression. |
Type |
getCoreType()
Get the actual Type in cases where getting a RefType will be a problem. |
java.lang.String |
getDisplayColorHint()
Return a String specifying the color to use for coloring this node in a graphical display. |
java.lang.String |
getDisplayShapeHint()
Return a String specifying a shape to use when drawing this node in a graphical display. |
java.lang.String |
getDisplayText()
Return a String suitable for labeling this node in a graphical display. |
Node |
getParent()
Return my parent in the Clef tree if any. |
Type |
getType()
Return the Type associated with this Node. |
static int |
number()
Return the current number of instances of this class. |
protected void |
setChildParent(Vector list)
|
void |
setParent(Node parent)
Not all nodes have parents in the CLEF AST since it is really a DAG and not a tree structure. |
void |
setType(Type type)
Specify the type associated with this expression. |
java.lang.String |
toStringSpecial()
Return any special information of a node that is not a child or annotation. |
void |
visit(Predicate p)
The visit() method is used to implement a visit 'pattern'. |
| Methods inherited from class scale.clef.Node |
createChildren, getChildren, getDecl, setAnnotationLevel, setReportLevel, toString, toString, toStringChildren |
| Methods inherited from class scale.common.Root |
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, hashCode, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Expression(Type type)
| Method Detail |
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - [needs description]public static int number()
public boolean equivalent(java.lang.Object exp)
public final Node getParent()
getParent in class Nodescale.clef.Nodepublic void setParent(Node parent)
NodesetParent in class Nodep - my parent in the Clef treeprotected void setChildParent(Vector list)
public java.lang.String toStringSpecial()
RoottoStringSpecial in class Nodepublic java.lang.String getDisplayText()
getDisplayText in class Rootpublic java.lang.String getDisplayColorHint()
getDisplayColorHint in class Rootpublic java.lang.String getDisplayShapeHint()
getDisplayShapeHint in class Rootpublic void visit(Predicate p)
Nodevisit in class Nodepublic final Type getType()
NodegetType in class Nodepublic void setType(Type type)
public final Type getCoreType()
getCoreType in class NodegetType(),
RefTypepublic java.lang.Object getConstantValue()
Latticepublic long canonical()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||