use of org.drools.drl.ast.descr.EnumLiteralDescr in project drools by kiegroup.
the class EnumGenerator method generate.
public TypeDeclaration generate(EnumDeclarationDescr enumDeclarationDescr) {
NodeList<Modifier> modifiers = nodeList(Modifier.publicModifier());
enumDeclaration = new EnumDeclaration(modifiers, enumDeclarationDescr.getFullTypeName());
for (Map.Entry<String, TypeFieldDescr> field : enumDeclarationDescr.getFields().entrySet()) {
addField(field);
}
for (EnumLiteralDescr enumLiteral : enumDeclarationDescr.getLiterals()) {
addEnumerationValue(enumLiteral);
}
createConstructor(enumDeclarationDescr);
return enumDeclaration;
}
Aggregations