java.lang.Object
openjava.ptree.ParseTreeObject
openjava.ptree.NonLeaf
openjava.ptree.AssignmentExpression
- All Implemented Interfaces:
- java.lang.Cloneable, Expression, ParseTree, VariableInitializer
- public class AssignmentExpression
- extends NonLeaf
- implements Expression
The AssignmentExpression class represents
an assignment expression with an assignment operator.
| Fields inherited from class openjava.ptree.NonLeaf |
|
| Methods inherited from class openjava.ptree.NonLeaf |
childrenAccept, elementAt, equals, getComment, getContents, getLength, replaceChildWith, set, set, set, set, set, set, set, set, set, setComment, setElementAt |
EQUALS
public static final int EQUALS
- See Also:
- Constant Field Values
MULT
public static final int MULT
- See Also:
- Constant Field Values
DIVIDE
public static final int DIVIDE
- See Also:
- Constant Field Values
MOD
public static final int MOD
- See Also:
- Constant Field Values
ADD
public static final int ADD
- See Also:
- Constant Field Values
SUB
public static final int SUB
- See Also:
- Constant Field Values
SHIFT_L
public static final int SHIFT_L
- See Also:
- Constant Field Values
SHIFT_R
public static final int SHIFT_R
- See Also:
- Constant Field Values
SHIFT_RR
public static final int SHIFT_RR
- See Also:
- Constant Field Values
AND
public static final int AND
- See Also:
- Constant Field Values
XOR
public static final int XOR
- See Also:
- Constant Field Values
OR
public static final int OR
- See Also:
- Constant Field Values
opr_string
static final java.lang.String[] opr_string
opr
private int opr
AssignmentExpression
public AssignmentExpression(Expression lexp,
int opr,
Expression rexp)
- Allocates a new object.
AssignmentExpression
public AssignmentExpression(Expression lexp,
java.lang.String opr,
Expression rexp)
AssignmentExpression
public AssignmentExpression()
makeRecursiveCopy
public ParseTree makeRecursiveCopy()
- Description copied from interface:
ParseTree
- Makes a new copy (another object) of this nonleaf-node recursively.
The objects contained by this object will also be copied.
- Specified by:
makeRecursiveCopy in interface ParseTree- Overrides:
makeRecursiveCopy in class NonLeaf
makeCopy
public ParseTree makeCopy()
- Description copied from interface:
ParseTree
- Makes a new copy of this nonleaf-node as a ptree-node.
The objects contained by the new object are same as
these contained by the original object.
- Specified by:
makeCopy in interface ParseTree- Overrides:
makeCopy in class ParseTreeObject
getLeft
public Expression getLeft()
- Gets the expression of the left operand.
setLeft
public void setLeft(Expression lexpr)
- Sets the expression of the left operand.
getRight
public Expression getRight()
- Gets the expression of the right operand.
setRight
public void setRight(Expression rexpr)
- Sets the expression of the right operand.
getOperator
public int getOperator()
- Gets the id number of the operator.
setOperator
public void setOperator(int opr)
- Sets the id number of the operator.
operatorString
public java.lang.String operatorString()
accept
public void accept(openjava.ptree.util.ParseTreeVisitor v)
throws ParseTreeException
- Description copied from interface:
ParseTree
- Accepts a
ParseTreeVisitor object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern.
This invoke an appropriate visit() method on the
accepted visitor.
- Specified by:
accept in interface ParseTree- Specified by:
accept in class ParseTreeObject
getType
public openjava.mop.OJClass getType(openjava.mop.Environment env)
throws java.lang.Exception
- Specified by:
getType in interface Expression