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.PrettyPrinter;
14: import de.uka.ilkd.key.java.expression.Assignment;
15: import de.uka.ilkd.key.java.visitor.Visitor;
16: import de.uka.ilkd.key.util.ExtList;
17:
18: /**
19: * Pre increment.
20: */
21:
22: public class PreIncrement extends Assignment {
23:
24: /**
25: * Pre increment.
26: * @param children an ExtList with all children of this node
27: */
28:
29: public PreIncrement(ExtList children) {
30: super (children);
31: }
32:
33: /**
34: * Get arity.
35: * @return the int value.
36: */
37:
38: public int getArity() {
39: return 1;
40: }
41:
42: /**
43: * Get precedence.
44: * @return the int value.
45: */
46:
47: public int getPrecedence() {
48: return 1;
49: }
50:
51: /**
52: * Get notation.
53: * @return the int value.
54: */
55:
56: public int getNotation() {
57: return PREFIX;
58: }
59:
60: /** calls the corresponding method of a visitor in order to
61: * perform some action/transformation on this element
62: * @param v the Visitor
63: */
64: public void visit(Visitor v) {
65: v.performActionOnPreIncrement(this );
66: }
67:
68: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
69: p.printPreIncrement(this);
70: }
71: }
|