01: /*
02: * Spoon - http://spoon.gforge.inria.fr/
03: * Copyright (C) 2006 INRIA Futurs <renaud.pawlak@inria.fr>
04: *
05: * This software is governed by the CeCILL-C License under French law and
06: * abiding by the rules of distribution of free software. You can use, modify
07: * and/or redistribute the software under the terms of the CeCILL-C license as
08: * circulated by CEA, CNRS and INRIA at http://www.cecill.info.
09: *
10: * This program is distributed in the hope that it will be useful, but WITHOUT
11: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: * FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.
13: *
14: * The fact that you are presently reading this means that you have had
15: * knowledge of the CeCILL-C license and that you accept its terms.
16: */
17:
18: package spoon.reflect.code;
19:
20: /**
21: * This abstract code element represents all the statements, which can be part
22: * of a block.
23: *
24: * @see spoon.reflect.code.CtBlock
25: */
26: public interface CtStatement extends CtCodeElement {
27:
28: /**
29: * Inserts a statement after the current statement.
30: */
31: void insertAfter(CtStatement statement);
32:
33: /**
34: * Inserts a statement list before the current statement.
35: */
36: void insertAfter(CtStatementList<?> statements);
37:
38: /**
39: * Inserts a statement before the current statement.
40: */
41: void insertBefore(CtStatement statement);
42:
43: /**
44: * Inserts a statement list before the current statement.
45: */
46: void insertBefore(CtStatementList<?> statements);
47:
48: /**
49: * Gets the label of this statement if defined.
50: *
51: * @return the label's name (null if undefined)
52: */
53: String getLabel();
54:
55: /**
56: * Sets the label of this statement.
57: */
58: void setLabel(String label);
59:
60: }
|