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 an expression 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: public interface CtCodeSnippetExpression<T> extends CtCodeSnippet,
12: CtExpression<T> {
13:
14: /**
15: * Compiles this expression snippet to produce the corresponding AST expression.
16: *
17: * @throws CtSnippetCompilationError
18: * when the current snippet is not valid Java code expression
19: */
20: CtExpression<T> compile() throws CtSnippetCompilationError;
21:
22: }
|