In Java you can create a single file and it may contain more than one enum\class, for example something like this:
Filename: Recorder.java
public enum Recorder {
RECORDER_A, RECORDER_B;
};
enum Feature {
FEATURE_A, FEATURE_B;
};
I'm able to create the "Recorder" enum using JavaPoet, but I can't figure out how to create the 2nd one... notice - they are not nested!
Thank you for any input :-)
This is not possible in JavaPoet because it has caused certain problems with certain build tools. Work around by creating separate files for each top-level type.