|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.hir.Expression
cetus.hir.BinaryExpression
public class BinaryExpression
| Field Summary | |
|---|---|
protected BinaryOperator |
op
|
| Fields inherited from class cetus.hir.Expression |
|---|
children, needs_parens, object_print_method, parent |
| Constructor Summary | |
|---|---|
BinaryExpression(Expression lhs,
BinaryOperator op,
Expression rhs)
Creates a binary expression. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates and returns a deep copy of this expression. |
static void |
defaultPrint(BinaryExpression expr,
java.io.OutputStream stream)
Prints a binary expression to a stream. |
Expression |
getLHS()
Returns the lefthand expression. |
BinaryOperator |
getOperator()
Returns the operator of the expression. |
Expression |
getRHS()
Returns the righthand expression. |
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently created objects will use the supplied method. |
void |
setLHS(Expression expr)
Sets the lefthand expression. |
void |
setOperator(BinaryOperator op)
Sets the operator for the expression. |
void |
setRHS(Expression expr)
Sets the righthand expression. |
java.lang.String |
toString()
Every expression class should override toString method. |
| Methods inherited from class cetus.hir.Expression |
|---|
compareTo, equals, equals2, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verify |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected BinaryOperator op
| Constructor Detail |
|---|
public BinaryExpression(Expression lhs,
BinaryOperator op,
Expression rhs)
lhs - The lefthand expression.op - A binary operator.rhs - The righthand expression.| Method Detail |
|---|
public java.lang.Object clone()
Expression
clone in class Expression
public static void defaultPrint(BinaryExpression expr,
java.io.OutputStream stream)
expr - The expression to print.stream - The stream on which to print the expression.public java.lang.String toString()
Expression
toString in class Expressionpublic Expression getLHS()
public BinaryOperator getOperator()
public Expression getRHS()
public static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setLHS(Expression expr)
expr - The new lefthand expression. It must not be
the child of another expression.public void setOperator(BinaryOperator op)
op - The operator.public void setRHS(Expression expr)
expr - The new righthand expression. It must not be
the child of another expression.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||