}
private IASTDeclaration buildEnumDeclaration(final EnumDeclarationInfo enumDeclarationInfo) {
// Ugly hack because ASTWriter doesn't support "new enums"
final IASTName enumerationName = f.newName(("class " + enumDeclarationInfo.getName().getIdentifier()).toCharArray());
final ICPPASTEnumerationSpecifier enumerationSpecifier = f.newEnumerationSpecifier(enumerationName);
enumerationSpecifier.setIsScoped(true);
for (final EnumConstantDeclarationInfo enumConstantDeclaration : enumDeclarationInfo.enumConstantDeclarations()) {
enumerationSpecifier.addEnumerator(buildEnumConstantDeclaration(enumConstantDeclaration));
}
return f.newSimpleDeclaration(enumerationSpecifier);
}