edu.uci.eecs.doc.cascade.controlflow
Class Goto
java.lang.Object
edu.uci.eecs.doc.cascade.controlflow.Node
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
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 |
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 belongsscope
- 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
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"