- 所有超级接口:
-
Mirror,ObjectReference,Value
目标虚拟机中的一个模块。
ModuleReference 上的任何直接或间接以 ModuleReference 作为参数的方法,如果目标虚拟机已断开连接并且 VMDisconnectEvent 已经或可以从 EventQueue 中读取,则可能抛出 VMDisconnectedException。
ModuleReference 上的任何直接或间接以 ModuleReference 作为参数的方法,如果目标虚拟机已经耗尽内存,则可能抛出 VMOutOfMemoryException。
ModuleReference 上的任何方法,直接或间接以 ModuleReference 作为参数的方法,如果镜像模块已被卸载,则可能抛出 InvalidModuleException。并非所有目标虚拟机都支持此类。使用 VirtualMachine.canGetModuleInfo() 来确定是否支持该类。
- 自JDK版本:
- 9
-
Field Summary
Fields declared in interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED -
Method Summary
Methods declared in interface com.sun.jdi.Mirror
toString, virtualMachineMethods declared in interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads
-
Method Details
-
name
String name()返回模块名称。如果此模块是一个无名模块,则此方法返回null。- 返回值:
- 此模块的名称。
-
classLoader
ClassLoaderReference classLoader()返回此模块的ClassLoaderReference对象。- 返回值:
-
此模块的
ClassLoaderReference对象。
-