All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.AssignmentExpression
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.NonLeaf
|
+----openjava.ptree.AssignmentExpression
- public class AssignmentExpression
- extends NonLeaf
- implements Expression
The AssignmentExpression
class represents
an assignment expression with an assignment operator.
- See Also:
- Expression
-
ADD
-
-
AND
-
-
DIVIDE
-
-
EQUALS
-
-
MOD
-
-
MULT
-
-
OR
-
-
SHIFT_L
-
-
SHIFT_R
-
-
SHIFT_RR
-
-
SUB
-
-
XOR
-
-
AssignmentExpression()
-
-
AssignmentExpression(Expression, int, Expression)
- Allocates a new object.
-
getKind()
-
-
getLeft()
- Gets the expression of the left operand.
-
getOperator()
- Gets the id number of the operator.
-
getRight()
- Gets the expression of the right operand.
-
makeCopy()
- Makes a new copy of this nonleaf-node as a ptree-node.
-
makeRecursiveCopy()
- Makes a new copy (another object) of this nonleaf-node recursively.
-
setLeft(Expression)
- Sets the expression of the left operand.
-
setOperator(int)
- Sets the id number of the operator.
-
setRight(Expression)
- Sets the expression of the right operand.
-
writeCode()
- Writes the code this parse-tree presents for.
EQUALS
public static final int EQUALS
MULT
public static final int MULT
DIVIDE
public static final int DIVIDE
MOD
public static final int MOD
ADD
public static final int ADD
SUB
public static final int SUB
SHIFT_L
public static final int SHIFT_L
SHIFT_R
public static final int SHIFT_R
SHIFT_RR
public static final int SHIFT_RR
AND
public static final int AND
XOR
public static final int XOR
OR
public static final int OR
AssignmentExpression
public AssignmentExpression(Expression lexp,
int opr,
Expression rexp)
- Allocates a new object.
- Parameters:
- lexp - the left expression.
- opr - the id number of the operator.
- rexp - the right expression.
AssignmentExpression
public AssignmentExpression()
makeRecursiveCopy
public Ptree makeRecursiveCopy()
- Makes a new copy (another object) of this nonleaf-node recursively.
- Overrides:
- makeRecursiveCopy in class NonLeaf
makeCopy
public Ptree makeCopy()
- Makes a new copy of this nonleaf-node as a ptree-node.
- Overrides:
- makeCopy in class NonLeaf
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getLeft
public Expression getLeft()
- Gets the expression of the left operand.
- Returns:
- the left expression.
setLeft
public void setLeft(Expression lexpr)
- Sets the expression of the left operand.
- Parameters:
- lexpr - the left expression.
getRight
public Expression getRight()
- Gets the expression of the right operand.
- Returns:
- the right expression.
setRight
public void setRight(Expression rexpr)
- Sets the expression of the right operand.
- Parameters:
- rexpr - the right expression.
getOperator
public int getOperator()
- Gets the id number of the operator.
- Returns:
- the id number of the operator.
getKind
public int getKind()
setOperator
public void setOperator(int opr)
- Sets the id number of the operator.
- Parameters:
- opr - the id number of the operator.
All Packages Class Hierarchy This Package Previous Next Index