|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlab7.AbstractNode
public abstract class AbstractNode
All AST nodes are subclasses of this node. This node knows how to link itself with other siblings and adopt children. Each node gets a node number to help identify it distinctly in an AST.
| Constructor Summary | |
|---|---|
AbstractNode()
|
|
| Method Summary | |
|---|---|
AbstractNode |
abandonChildren()
|
void |
accept(ReflectiveVisitor v)
Reflective visitor pattern |
AbstractNode |
adoptChildren(AbstractNode n)
Adopt the supplied node and all of its siblings under this node |
java.lang.String |
dump()
|
AbstractNode |
getChild()
|
AbstractNode |
getFirst()
|
java.lang.String |
getName()
|
int |
getNodeNum()
|
Type |
getNodeType()
|
AbstractNode |
getParent()
|
AbstractNode |
getSib()
|
AbstractNode |
makeSibling(AbstractNode sib)
Join the end of this sibling's list with the supplied sibling's list |
AbstractNode |
orphan()
|
void |
setNodeType(Type type)
|
java.lang.String |
toString()
|
void |
walkTree(Visitable v)
Obsolete, do not use! |
java.lang.String |
whatAmI()
Reflectively indicate the class of "this" node |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractNode()
| Method Detail |
|---|
public AbstractNode makeSibling(AbstractNode sib)
public AbstractNode adoptChildren(AbstractNode n)
public AbstractNode orphan()
public AbstractNode abandonChildren()
public AbstractNode getParent()
public AbstractNode getSib()
public AbstractNode getChild()
public AbstractNode getFirst()
public Type getNodeType()
public void setNodeType(Type type)
public java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String dump()
dump in interface NodeDumpablepublic int getNodeNum()
public java.lang.String whatAmI()
public final void accept(ReflectiveVisitor v)
accept in interface ReflectiveVisitablepublic void walkTree(Visitable v)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||