Seems like we should just switch this to an indexed for loop since you're already having to do it manually.
```java
List<Value> values = enumType.getValues();
for (int i = 0, count = values.size(); i < count; i++) {
  Value value = values.get(i);
  writer.emitEnumValue(value.getName() + "(" + value.getTag() + ")", i == count - 1);
}
```