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: * Post increment.
21: */
22:
23: public class PostIncrement extends Assignment {
24:
25: /**
26: * Post increment.
27: * @param unary the Expression to be incremented by one
28: */
29:
30: public PostIncrement(Expression unary) {
31: super (unary);
32: }
33:
34: /**
35: * Post increment.
36: * @param children an ExtList with all children of this node
37: */
38:
39: public PostIncrement(ExtList children) {
40: super (children);
41: }
42:
43: /**
44: * Get arity.
45: * @return the int value.
46: */
47:
48: public int getArity() {
49: return 1;
50: }
51:
52: /**
53: * Get precedence.
54: * @return the int value.
55: */
56:
57: public int getPrecedence() {
58: return 1;
59: }
60:
61: /**
62: * Get notation.
63: * @return the int value.
64: */
65:
66: public int getNotation() {
67: return POSTFIX;
68: }
69:
70: /** calls the corresponding method of a visitor in order to
71: * perform some action/transformation on this element
72: * @param v the Visitor
73: */
74: public void visit(Visitor v) {
75: v.performActionOnPostIncrement(this );
76: }
77:
78: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
79: p.printPostIncrement(this);
80: }
81: }
|