This answer to another questions suggests, as a workaround for finding anonymous classes via reflection, to simply try all names, starting with ...$1 and counting up until no more can be found. Is this guaranteed to find all inner classes, or could there be cases where they start at 0 or some numbers are left out (for whatever reason)?
This answer to another questions suggests, as a workaround for finding anonymous classes via
Share
The JLS 13.1 specifies:
So in theory, it does not have to start at 1, but it has to be something like
EnclosingClass$Nwhere N is a number.