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

java.lang.Object
  extended by edu.uci.eecs.doc.cascade.controlflow.Node
      extended by edu.uci.eecs.doc.cascade.controlflow.Goto
All Implemented Interfaces:
Iterable<Node>

public class Goto
extends Node

Represents goto instructions in a control flow tree. It is a "pseudo-node" because unlike other nodes, it does not represent an element of the source code. It is provided for clients of Cascade that require knowledge of goto instructions for timing analysis and other purposes.

Author:
Trevor Harmon

Field Summary
 
Fields inherited from class edu.uci.eecs.doc.cascade.controlflow.Node
block, nextNode, parent, scope, tree
 
Constructor Summary
Goto(Tree tree, int scope, Node parent, InstructionHandle gotoInstruction)
          Creates a new Goto object.
 
Method Summary
 List<InstructionHandle> getInstructions()
          Returns a one-element list containing the goto instruction represented by this node.
 String toString()
          Converts the goto node to a string.
 
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

Goto

public Goto(Tree tree,
            int scope,
            Node parent,
            InstructionHandle gotoInstruction)
Creates a new Goto 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)
gotoInstruction - a BCEL object representing the goto instruction
Method Detail

getInstructions

public List<InstructionHandle> getInstructions()
Returns a one-element list containing the goto instruction represented by this node.

Overrides:
getInstructions in class Node
Returns:
a list of bytecode instructions

toString

public String toString()
Converts the goto node to a string.

Overrides:
toString in class Object
Returns:
the string "goto"