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.statement;
12:
13: import de.uka.ilkd.key.java.Label;
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: * Break.
20: *
21: */
22:
23: public class Break extends LabelJumpStatement {
24:
25: /**
26: * Break.
27: */
28:
29: public Break() {
30: super ();
31: }
32:
33: /**
34: * Break.
35: * @param label a name for the label.
36: */
37: public Break(Label label) {
38: super (label);
39: }
40:
41: /**
42: * Constructor for the transformation of COMPOST ASTs to KeY.
43: * @param children the children of this AST element as KeY classes.
44: * May contain: Comments,
45: * a ProgramElementName (as label of the label jump statement)
46: */
47: public Break(ExtList children) {
48: super (children);
49: // label=(ProgramElementName)children.get(ProgramElementName.class);
50: }
51:
52: /** calls the corresponding method of a visitor in order to
53: * perform some action/transformation on this element
54: * @param v the Visitor
55: */
56: public void visit(Visitor v) {
57: v.performActionOnBreak(this );
58: }
59:
60: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
61: p.printBreak(this);
62: }
63: }
|