01: package spoon.reflect.code;
02:
03: import spoon.reflect.declaration.CtCodeSnippet;
04: import spoon.support.builder.CtSnippetCompilationError;
05:
06: /**
07: * This element is a code snippet that must represent a statement and can thus
08: * be inserted in the program's model as is. Code snippets should be avoided
09: * since no controls can be performed on them.
10: */
11:
12: public interface CtCodeSnippetStatement extends CtCodeSnippet,
13: CtStatement {
14:
15: /**
16: * Compiles this statement code snippet to produce the corresponding AST statement.
17: *
18: * @return a statement
19: * @throws CtSnippetCompilationError
20: * when the current snippet is not valid Java code
21: */
22: CtStatement compile() throws CtSnippetCompilationError;
23:
24: }
|