private EnumDeclaration generateEnum(){
  final String valueString="value";
  EnumDeclaration newEnum=new EnumDeclaration(ModifierSet.PUBLIC,null,getEnumerationClassName(),null,generateEnumConstantDeclarations(),null);
  FieldDeclaration valueField=new FieldDeclaration(ModifierSet.addModifier(ModifierSet.FINAL,ModifierSet.PUBLIC),ASTHelper.INT_TYPE,Collections.singletonList(new VariableDeclarator(new VariableDeclaratorId(valueString))));
  ASTHelper.addMember(newEnum,valueField);
  ConstructorDeclaration enumConstructor=new ConstructorDeclaration(0,null,null,name,Collections.singletonList(ASTHelper.createParameter(ASTHelper.INT_TYPE,valueString)),null,getDefaultConstructorBlockStatement(valueString));
  ASTHelper.addMember(newEnum,enumConstructor);
  return newEnum;
}

private EnumDeclaration generateEnum ( ) { final String valueString = "value" ; EnumDeclaration newEnum = new EnumDeclaration ( ModifierSet . PUBLIC , null , getEnumerationClassName ( ) , null , generateEnumConstantDeclarations ( ) , null ) ; FieldDeclaration valueField = new FieldDeclaration ( ModifierSet . addModifier ( ModifierSet . FINAL , ModifierSet . PUBLIC ) , ASTHelper . INT_TYPE , Collections . singletonList ( new VariableDeclarator ( new VariableDeclaratorId ( valueString ) ) ) ) ; ASTHelper . addMember ( newEnum , valueField ) ; ConstructorDeclaration enumConstructor = new ConstructorDeclaration ( 0 , null , null , name , Collections . singletonList ( ASTHelper . createParameter ( ASTHelper . INT_TYPE , valueString ) ) , null , getDefaultConstructorBlockStatement ( valueString ) ) ; ASTHelper . addMember ( newEnum , enumConstructor ) ; return newEnum ; }
generates the enumeration class body .
