statements.add(new TypeBuilder(factory, t(ArrayList.class, t(StageResource.class)))
.newObject()
.toLocalVariableDeclaration(t(List.class, t(StageResource.class)), list));
for (SideData sideData : stage.getSideData()) {
for (Location location : sideData.getClusterPaths()) {
statements.add(new ExpressionBuilder(factory, list)
.method("add", new TypeBuilder(factory, t(StageResource.class))
.newObject(
Models.toLiteral(factory, location.toPath('/')),
Models.toLiteral(factory, sideData.getLocalName()))
.toExpression())
.toStatement());
}
}
statements.add(new ExpressionBuilder(factory, list)
.toReturnStatement());
return factory.newMethodDeclaration(
null,
new AttributeBuilder(factory)
.annotation(t(Override.class))