|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstreamit.frontend.controlflow.CFGNode
public class CFGNode
A single-statement or single-expression node in a control flow graph. This class holds at most one expression or one statement; if it holds an expression, that expression must be associated with a statement. A node can be designated empty, in which case it is a special node used to designate entry or exit from the composite statement identified in the statement. Otherwise, if its expression is non-null, the node is a conditional node, and the expression must be boolean-valued. Otherwise, the node is a statement node.
| Constructor Summary | |
|---|---|
CFGNode(Statement stmt)
Create a statement node. |
|
CFGNode(Statement stmt,
boolean empty)
Create either a placeholder or a statement node. |
|
CFGNode(Statement stmt,
Expression expr)
Create an expression node. |
|
| Method Summary | |
|---|---|
Expression |
getExpr()
Get the expression associated with an expression node. |
Statement |
getStmt()
Get the statement associated with a node. |
boolean |
isEmpty()
Determine if this node is a placeholder node. |
boolean |
isExpr()
Determine if this node is an expression node. |
boolean |
isStmt()
Determine if this node is a statement node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CFGNode(Statement stmt)
stmt - Statement associated with the node
public CFGNode(Statement stmt,
boolean empty)
stmt - Statement associated with the nodeempty - true if this is a placeholder node, false if this is
a statement node
public CFGNode(Statement stmt,
Expression expr)
stmt - Statement associated with the nodeexpr - Expression associated with the node| Method Detail |
|---|
public boolean isEmpty()
public boolean isExpr()
public boolean isStmt()
public Expression getExpr()
null if this is not an expression
node; in that case, it is either a statement or a
placeholder node.
public Statement getStmt()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||