use of spoon.reflect.path.CtRole.FOR_INIT in project spoon by INRIA.
the class CtForImpl method setForInit.
@Override
public <T extends CtFor> T setForInit(List<CtStatement> statements) {
if (statements == null || statements.isEmpty()) {
this.forInit = CtElementImpl.emptyList();
return (T) this;
}
getFactory().getEnvironment().getModelChangeListener().onListDeleteAll(this, FOR_INIT, this.forInit, new ArrayList<>(this.forInit));
this.forInit.clear();
for (CtStatement stmt : statements) {
addForInit(stmt);
}
return (T) this;
}
Aggregations