1 package spoon.reflect.code; 2 3 import java.util.List; 4 5 import spoon.template.TemplateParameterList; 6 7 /** 8 * This code element represents a list of statements. It is not a valid Java 9 * program element and is never used directly in the meta-model, on contrary to 10 * a {@link spoon.reflect.code.CtBlock}. However, it is used as a container of 11 * statements during code manipulation and for defining multiple-statement 12 * template parameters. 13 * 14 * @param <R> the type of the returned expression if the last statement is a 15 * return statement 16 * @see spoon.template.TemplateParameterList 17 * @see spoon.reflect.code.CtBlock 18 * @see spoon.reflect.code.CtBlock#insertAfter(Filter, CtStatementList) 19 * @see spoon.reflect.code.CtBlock#insertBefore(Filter, CtStatementList) 20 */ 21 public interface CtStatementList<R> extends CtCodeElement, 22 TemplateParameterList<R> { 23 24 /** 25 * Returns the statement list. 26 */ 27 List<CtStatement> getStatements(); 28 29 /** 30 * Sets the statement list. 31 */ 32 void setStatements(List<CtStatement> statements); 33 } 34