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