sandmark.obfuscate.boolsplitter.dtree
Class ArithExpr
java.lang.Object
|
+--sandmark.obfuscate.boolsplitter.dtree.Node
|
+--sandmark.obfuscate.boolsplitter.dtree.Expr
|
+--sandmark.obfuscate.boolsplitter.dtree.ArithExpr
- All Implemented Interfaces:
- java.lang.Cloneable
- public class ArithExpr
- extends Expr
ArithExpr represents a binary arithmetic expression. It consists
of two operands and an operator.
Constructor Summary |
ArithExpr(char operation,
Expr left,
Expr right,
EDU.purdue.cs.bloat.editor.Type type)
Constructor. |
Methods inherited from class sandmark.obfuscate.boolsplitter.dtree.Node |
block, cleanup, copyInto, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visitChildren, visitOnly |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
operation
char operation
left
Expr left
right
Expr right
ADD
public static final char ADD
- See Also:
- Constant Field Values
SUB
public static final char SUB
- See Also:
- Constant Field Values
DIV
public static final char DIV
- See Also:
- Constant Field Values
MUL
public static final char MUL
- See Also:
- Constant Field Values
REM
public static final char REM
- See Also:
- Constant Field Values
AND
public static final char AND
- See Also:
- Constant Field Values
IOR
public static final char IOR
- See Also:
- Constant Field Values
XOR
public static final char XOR
- See Also:
- Constant Field Values
CMP
public static final char CMP
- See Also:
- Constant Field Values
CMPL
public static final char CMPL
- See Also:
- Constant Field Values
CMPG
public static final char CMPG
- See Also:
- Constant Field Values
ArithExpr
public ArithExpr(char operation,
Expr left,
Expr right,
EDU.purdue.cs.bloat.editor.Type type)
- Constructor.
- Parameters:
operation
- Arithmetic operation that this expression performs.left
- Left-hand argument to operation.right
- Right-hand argument to operation.type
- The type of this expression.
operation
public int operation()
left
public Expr left()
right
public Expr right()
visitForceChildren
public void visitForceChildren(TreeVisitor visitor)
- Description copied from class:
Node
- Visit the children of this node. Not all Nodes will have children to
visit.
- Specified by:
visitForceChildren
in class Node
visit
public void visit(TreeVisitor visitor)
- Specified by:
visit
in class Node
exprHashCode
public int exprHashCode()
- Description copied from class:
Expr
- Returns the hash code for this expresion.
- Specified by:
exprHashCode
in class Expr
equalsExpr
public boolean equalsExpr(Expr other)
- Compare this arithmetic expression to another Expression.
- Specified by:
equalsExpr
in class Expr
- Parameters:
other
- Expr to which to compare this.
- Returns:
- True, if both expressions have the same contents.
clone
public java.lang.Object clone()
- Specified by:
clone
in class Expr