如何知道`com.sun.jdi.ObjectReference`是否为枚举?

问题描述

如何确定com.sun.jdi.ObjectReference实例是否为枚举?我可以使用ObjectReference.type()获得实例的类型,该实例的类型将返回ClassType(如果它是一个类)。

解决方法

isEnum()上使用com.sun.jdi.ClassType方法

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...