0

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).

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

1 Answers1

1

Use the isEnum() method on com.sun.jdi.ClassType

k5_
  • 5,450
  • 2
  • 19
  • 27