private void readEnumField(Field field, EnumType type) {
   IntegerType baseType = (IntegerType) type.getBaseType();
   buffer.append(AccessorNameEmitter.getSetterName(field));
   buffer.append("(");
   buffer.append(type.getName());
   buffer.append(".toEnum(");
   readIntegerValue(buffer, baseType);
   buffer.append("));");
 }
 public String getCurrentElement() {
   StringBuilder builder = new StringBuilder();
   TypeInterface elType = array.getElementType();
   if (elType instanceof EnumType) {
     EnumType enumType = (EnumType) elType;
     IntegerType baseType = (IntegerType) enumType.getBaseType();
     builder.append(elType.getName());
     builder.append(".toEnum(");
     readIntegerValue(builder, baseType);
     builder.append(")");
   } else {
     builder.append("new ");
     builder.append(getElType());
     builder.append("(__in, __cc");
     builder.append(getActualParameterList());
     builder.append(")");
   }
   return builder.toString();
 }
 public String getEnumPackageName() {
   return enumeration.getPackage().getPackageName();
 }
 public String getName() {
   return enumeration.getName();
 }
 private void writeEnumField(Field field, EnumType type) {
   IntegerType baseType = (IntegerType) type.getBaseType();
   writeIntegerValue(buffer, AccessorNameEmitter.getGetterName(field) + "().getValue()", baseType);
 }