01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.java.expression.operator;
12:
13: import de.uka.ilkd.key.java.Expression;
14: import de.uka.ilkd.key.java.PrettyPrinter;
15: import de.uka.ilkd.key.java.expression.Assignment;
16: import de.uka.ilkd.key.java.visitor.Visitor;
17: import de.uka.ilkd.key.util.ExtList;
18:
19: /**
20: * Shift right assignment.
21: * @author <TT>AutoDoc</TT>
22: */
23:
24: public class ShiftRightAssignment extends Assignment {
25:
26: /**
27: * Shift right assignment.
28: */
29: public ShiftRightAssignment() {
30: }
31:
32: /**
33: * Shift right assignment.
34: * @param lhs an expression.
35: * @param rhs an expression.
36: */
37: public ShiftRightAssignment(Expression lhs, Expression rhs) {
38: super (lhs, rhs);
39: }
40:
41: /**
42: * Constructor for the transformation of COMPOST ASTs to KeY.
43: * The first occurrence of an Expression in the given list is taken as
44: * the left hand side
45: * of the expression, the second occurrence is taken as the right hand
46: * side of the expression.
47: * @param children the children of this AST element as KeY classes.
48: */
49: public ShiftRightAssignment(ExtList children) {
50: super (children);
51: }
52:
53: /**
54: * Get arity.
55: * @return the int value.
56: */
57:
58: public int getArity() {
59: return 2;
60: }
61:
62: /**
63: * Get precedence.
64: * @return the int value.
65: */
66:
67: public int getPrecedence() {
68: return 13;
69: }
70:
71: /**
72: * Get notation.
73: * @return the int value.
74: */
75:
76: public int getNotation() {
77: return INFIX;
78: }
79:
80: /** calls the corresponding method of a visitor in order to
81: * perform some action/transformation on this element
82: * @param v the Visitor
83: */
84: public void visit(Visitor v) {
85: v.performActionOnShiftRightAssignment(this );
86: }
87:
88: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
89: p.printShiftRightAssignment(this);
90: }
91: }
|