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.visitor.Visitor;
16: import de.uka.ilkd.key.util.ExtList;
17:
18: /**
19: * Modulo.
20: */
21: public class Modulo extends BinaryOperator {
22:
23: /**
24: * Modulo.
25: */
26:
27: public Modulo(ExtList children) {
28: super (children);
29: }
30:
31: public Modulo(Expression lhs, Expression rhs) {
32: super (lhs, rhs);
33: }
34:
35: /**
36: * Get precedence.
37: * @return the int value.
38: */
39:
40: public int getPrecedence() {
41: return 2;
42: }
43:
44: /**
45: * Get notation.
46: * @return the int value.
47: */
48:
49: public int getNotation() {
50: return INFIX;
51: }
52:
53: /** calls the corresponding method of a visitor in order to
54: * perform some action/transformation on this element
55: * @param v the Visitor
56: */
57: public void visit(Visitor v) {
58: v.performActionOnModulo(this );
59: }
60:
61: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
62: p.printModulo(this);
63: }
64:
65: }
|