|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.string.intermediate.Statement
public abstract class Statement
Superclass of all statements.
A statements belongs to the body of some method. It has control flow edges to and from other statements.
Constructor Summary | |
---|---|
Statement()
|
Method Summary | |
---|---|
void |
addSucc(Statement s)
Adds a control flow edge from this statement to the given. |
boolean |
addSuccIfAbsent(Statement s)
Adds a control flow edge from this statement to the given, if it was not already there. |
int |
compareTo(Statement v)
|
int |
getIndex()
Returns the index of this statement, indicating the sequence number in which the statement was added to its method. |
Method |
getMethod()
Returns the method whose body contains this statement. |
Collection<Statement> |
getPreds()
Returns (unmodifiable) collection of all origins of control flow edges going to this node. |
Collection<Statement> |
getSuccs()
Returns (unmodifiable) collection of all targets of control flow edges originating from this node. |
String |
toString()
Returns a string representation of this statement. |
abstract void |
visitBy(StatementVisitor v)
Visit this statement by the given statement visitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Statement()
Method Detail |
---|
public void addSucc(Statement s)
addSuccIfAbsent(Statement)
to add it only if it is not already there.
s
- the target statement of the edge.public boolean addSuccIfAbsent(Statement s)
s
- the target statement of the edge.
public int compareTo(Statement v)
compareTo
in interface Comparable<Statement>
public int getIndex()
public Method getMethod()
public Collection<Statement> getPreds()
Statement
objects.public Collection<Statement> getSuccs()
Statement
objects.public String toString()
ToStringVisitor
.
toString
in class Object
public abstract void visitBy(StatementVisitor v)
v
- the visitor.
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |