edu.uci.eecs.doc.cascade.controlflow
Class Do

java.lang.Object
  extended by edu.uci.eecs.doc.cascade.controlflow.Node
      extended by 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

Field Summary
 
Fields inherited from class edu.uci.eecs.doc.cascade.controlflow.Node
block, nextNode, parent, scope, tree
 
Constructor Summary
Do(Tree tree, int scope, Node parent)
          Creates a new Do object.
 
Method Summary
 List<InstructionHandle> getInstructions()
          Returns the list of instructions that correspond to this control flow node.
 String toString()
          Converts the node to a string representation
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Do

public Do(Tree tree,
          int scope,
          Node parent)
Creates a new Do object.

Parameters:
tree - the control flow tree to which this node belongs
scope - the lexical scope of the node (0 = top-level scope)
parent - the node's parent (null if the node has no parent)
Method Detail

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