How to know if an `com.sun.jdi.ObjectReference` is an Enum?

50 Views Asked by At

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

1

There are 1 best solutions below

0
k5_ On BEST ANSWER

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