How to find out if an com.sun.jdi.ObjectReference
instance is an enum? I can get the type of the instance with ObjectReference.type()
which gives a ClassType
back (if it is a class).
Asked
Active
Viewed 46 times
0

Nfff3
- 321
- 8
- 24
-
According to the javadoc there is a `isEnum()` method on `ClassType`. Never tried it myself. Does it work? – k5_ Aug 18 '20 at 20:48
-
@k5_, OMG, I'm so tired I didn't even see it. I tested it and it works. – Nfff3 Aug 18 '20 at 20:57