|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norecess.citkit.tir.expressions.IfETIR
public class IfETIR
The TIR for an if statement.
Constructor Summary | |
---|---|
IfETIR(ExpressionTIR test,
ExpressionTIR thenClause)
Basic constructor. |
|
IfETIR(ExpressionTIR test,
ExpressionTIR thenClause,
ExpressionTIR elseClause)
Basic constructor. |
|
IfETIR(IPosition position,
ExpressionTIR test,
ExpressionTIR thenClause)
Constructs an if statement without an else clause. |
|
IfETIR(IPosition position,
ExpressionTIR test,
ExpressionTIR thenClause,
ExpressionTIR elseClause)
Constructs an if statement. |
Method Summary | ||
---|---|---|
|
accept(ExpressionTIRVisitor<T> visitor)
Implements the visitor pattern with ExpressionTIRVisitor . |
|
boolean |
equals(java.lang.Object o)
|
|
ExpressionTIR |
getElseClause()
Returns the else clause of the if statement. |
|
IPosition |
getPosition()
Retrieves the position of the code that generated the TIR. |
|
ExpressionTIR |
getTest()
Returns the test of the if statement. |
|
ExpressionTIR |
getThenClause()
Returns the then clause of the if statement. |
|
HobbesType |
getType()
By default, this returns the type of the then clause. |
|
int |
hashCode()
|
|
boolean |
isSingleBranch()
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IfETIR(IPosition position, ExpressionTIR test, ExpressionTIR thenClause, ExpressionTIR elseClause)
position
- the position of the if statement in the source code.test
- the test of the if statement.thenClause
- the then clause.elseClause
- the else clause.public IfETIR(IPosition position, ExpressionTIR test, ExpressionTIR thenClause)
position
- the position of the if statement in the source code.test
- the test of the if statement.thenClause
- the then clause.public IfETIR(ExpressionTIR test, ExpressionTIR thenClause, ExpressionTIR elseClause)
test
- the test.thenClause
- the then clause.elseClause
- the else clause.public IfETIR(ExpressionTIR test, ExpressionTIR thenClause)
test
- the test.thenClause
- the then clause.Method Detail |
---|
public ExpressionTIR getElseClause()
getElseClause
in interface IIfETIR
null
).public ExpressionTIR getTest()
getTest
in interface IIfETIR
public ExpressionTIR getThenClause()
getThenClause
in interface IIfETIR
public HobbesType getType()
getType
in interface ExpressionTIR
ExpressionTIR.getType()
public <T> T accept(ExpressionTIRVisitor<T> visitor)
ExpressionTIR
ExpressionTIRVisitor
.
accept
in interface ExpressionTIR
visitor
- the visitor object.
public boolean isSingleBranch()
isSingleBranch
in interface IIfETIR
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public IPosition getPosition()
getPosition
in interface HobbesTIR
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |