edu.uci.eecs.doc.cascade.controlflow
Class Do
java.lang.Object
edu.uci.eecs.doc.cascade.controlflow.Node
edu.uci.eecs.doc.cascade.controlflow.Do
- All Implemented Interfaces:
- Iterable<Node>
public class Do
- extends Node
A pseudo-node that represents the do
keyword, used only for
visualizing a control flow tree. It is a false node because it doesn't
correspond to any actual bytecode sequence.
- Author:
- Trevor Harmon
Constructor Summary |
Do(Tree tree,
int scope,
Node parent)
Creates a new Do object. |
Methods inherited from class edu.uci.eecs.doc.cascade.controlflow.Node |
getBlock, getEnclosingLoop, getFirstInstruction, getLastInstruction, getMethodInvocations, getMethodInvocations, getNext, getOutermostLoop, getParent, getScope, getSourceCodeLineNumber, getStartAddress, getTree, iterator, lastNode, setNext |
Do
public Do(Tree tree,
int scope,
Node parent)
- Creates a new Do object.
- Parameters:
tree
- the control flow tree to which this node belongsscope
- the lexical scope of the node (0 = top-level scope)parent
- the node's parent (null if the node has no parent)
getInstructions
public List<InstructionHandle> getInstructions()
- Returns the list of instructions that correspond to this control flow node.
- Overrides:
getInstructions
in class Node
- Returns:
- an empty list because this is a pseudonode and has no instructions
toString
public String toString()
- Converts the node to a string representation
- Overrides:
toString
in class Object
- Returns:
- a string representing the node