Scope scope = enumType.members();
Deque<String> values = new ArrayDeque<>();
for (Scope.Entry e = scope.elems; e != null; e = e.sibling) {
if (e.sym instanceof VarSymbol) {
VarSymbol var = (VarSymbol) e.sym;
if ((var.flags() & Flags.ENUM) != 0) {
/**
* Javac gives us the members backwards, apparently. It's worth making an effort to
* preserve declaration order because it's useful for diagnostics (e.g. in
* {@link MissingCasesInEnumSwitch}).
*/