}
}
@Override
public JSON getDescriptor(ApplicationMetaModel application) {
JSON config = new JSON();
AbstractContainerMetaModel metaModel = application.getChild(TemplateContainerMetaModel.KEY);
LinkedHashSet<String> templates = new LinkedHashSet<String>();
for (TemplateRefMetaModel ref : metaModel.getChildren(TemplateRefMetaModel.class)) {
if (ref instanceof ElementMetaModel) {
templates.add(((ElementMetaModel)ref).getPath().getName().toString());
}
}
config.map("templates", templates);
config.set("package", metaModel.getQN().toString());
return config;
}