|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norecess.citkit.tir.expressions.OperatorETIR
public class OperatorETIR
The TIR for an operator expression. This covers most types of
expressions---comparative, additive, multiplicative, etc. The
OperatorETIR.Operator enumerate type supplies values for the possible
operators.
| Nested Class Summary | |
|---|---|
static class |
OperatorETIR.Operator
Represents an operator like addition or multiplication. |
| Nested classes/interfaces inherited from interface org.norecess.citkit.tir.expressions.IOperatorETIR |
|---|
IOperatorETIR.IOperator |
| Constructor Summary | |
|---|---|
OperatorETIR(ExpressionTIR left,
IOperatorETIR.IOperator operator,
ExpressionTIR right)
Basic constructor. |
|
OperatorETIR(IPosition position,
ExpressionTIR left,
IOperatorETIR.IOperator operator,
ExpressionTIR right)
Constructs an operator expression. |
|
| Method Summary | ||
|---|---|---|
|
accept(ExpressionTIRVisitor<T> visitor)
Implements the visitor pattern with ExpressionTIRVisitor. |
|
boolean |
equals(java.lang.Object o)
|
|
ExpressionTIR |
getLeft()
Returns the left expression. |
|
ExpressionTIR |
getLeftExpression()
Returns the left expression. |
|
IOperatorETIR.IOperator |
getOperator()
Returns the operator. |
|
IPosition |
getPosition()
Retrieves the position of the code that generated the TIR. |
|
ExpressionTIR |
getRight()
Returns the right expression. |
|
ExpressionTIR |
getRightExpression()
Returns the right expression. |
|
HobbesType |
getType()
Currently, this method returns the type of the left subtree. |
|
int |
hashCode()
|
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OperatorETIR(IPosition position,
ExpressionTIR left,
IOperatorETIR.IOperator operator,
ExpressionTIR right)
position - the position of the operator expression in the source code.left - the expression to the left of the operator.operator - the operator (see the constants of this class).right - the expression to the right of the operator.
public OperatorETIR(ExpressionTIR left,
IOperatorETIR.IOperator operator,
ExpressionTIR right)
left - the left subexpression.operator - the operator.right - the right subexpression.| Method Detail |
|---|
public ExpressionTIR getLeftExpression()
public ExpressionTIR getLeft()
getLeft in interface IOperatorETIRpublic IOperatorETIR.IOperator getOperator()
getOperator in interface IOperatorETIRpublic ExpressionTIR getRightExpression()
public ExpressionTIR getRight()
getRight in interface IOperatorETIRpublic HobbesType getType()
getType in interface ExpressionTIRpublic <T> T accept(ExpressionTIRVisitor<T> visitor)
ExpressionTIRExpressionTIRVisitor.
accept in interface ExpressionTIRvisitor - the visitor object.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic IPosition getPosition()
getPosition in interface HobbesTIR
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||