* * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canGetOwnedMonitorInfo(); /** * Determines if the target VM supports the retrieval * of the monitor for which a thread is currently waiting. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canGetCurrentContendedMonitor(); /** * Determines if the target VM supports the retrieval * of the monitor information for an object. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canGetMonitorInfo(); /** * Determines if the target VM supports filtering * events by specific instance object. For example, * see {@link com.sun.jdi.request.BreakpointRequest#addInstanceFilter}. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canUseInstanceFilters(); /** * Determines if the target VM supports any level * of class redefinition. * @see #redefineClasses * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canRedefineClasses(); /** * Determines if the target VM supports the addition * of methods when performing class redefinition. * @see #redefineClasses * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canAddMethod(); /** * Determines if the target VM supports unrestricted * changes when performing class redefinition. * @see #redefineClasses * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canUnrestrictedlyRedefineClasses(); /** * Determines if the target VM supports popping * frames of a threads stack. * @see ThreadReference#popFrames * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canPopFrames(); /** * Determines if the target VM supports getting * the source debug extension. * @see ReferenceType#sourceDebugExtension * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canGetSourceDebugExtension(); /** * Determines if the target VM supports the creation of * {@link com.sun.jdi.request.VMDeathRequest}s. * @see com.sun.jdi.request.EventRequestManager#createVMDeathRequest * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canRequestVMDeathEvent(); /** * Determines if the target VM supports the inclusion of return values * in * {@link com.sun.jdi.event.MethodExitEvent}s. * @see com.sun.jdi.request.EventRequestManager#createMethodExitRequest * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetMethodReturnValues(); /** * Determines if the target VM supports the accessing of class instances, * instance counts, and referring objects. * * @see #instanceCounts * @see ReferenceType#instances(long) * @see ObjectReference#referringObjects(long) * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetInstanceInfo(); /** * Determines if the target VM supports the filtering of * class prepare events by source name. * * see {@link com.sun.jdi.request.ClassPrepareRequest#addSourceNameFilter}. * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canUseSourceNameFilters(); /** * Determines if the target VM supports the forcing of a method to * return early. * * @see ThreadReference#forceEarlyReturn(Value) * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canForceEarlyReturn(); /** * Determines if the target VM is a read-only VM. If a method which * would modify the state of the VM is called on a read-only VM, * then {@link VMCannotBeModifiedException} is thrown. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.5 */ boolean canBeModified(); /** * Determines if the target VM supports the creation of * {@link com.sun.jdi.request.MonitorContendedEnterRequest}s. * {@link com.sun.jdi.request.MonitorContendedEnteredRequest}s. * {@link com.sun.jdi.request.MonitorWaitRequest}s. * {@link com.sun.jdi.request.MonitorWaitedRequest}s. * @see com.sun.jdi.request.EventRequestManager#createMonitorContendedEnterRequest * @see com.sun.jdi.request.EventRequestManager#createMonitorContendedEnteredRequest * @see com.sun.jdi.request.EventRequestManager#createMonitorWaitRequest * @see com.sun.jdi.request.EventRequestManager#createMonitorWaitedRequest * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canRequestMonitorEvents(); /** * Determines if the target VM supports getting which * frame has acquired a monitor. * @see com.sun.jdi.ThreadReference#ownedMonitorsAndFrames * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetMonitorFrameInfo(); /** * Determines if the target VM supports reading class file * major and minor versions. * * @see ReferenceType#majorVersion() * @see ReferenceType#minorVersion() * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetClassFileVersion(); /** * Determines if the target VM supports getting constant pool * information of a class. * * @see ReferenceType#constantPoolCount() * @see ReferenceType#constantPool() * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetConstantPool(); /** * Set this VM's default stratum (see {@link Location} for a * discussion of strata). Overrides the per-class default set * in the class file. * <P> * Affects location queries (such as, * {@link Location#sourceName()}) * and the line boundaries used in * single stepping. * * @param stratum the stratum to set as VM default, * or null to use per-class defaults. * * @throws java.lang.UnsupportedOperationException if the * target virtual machine does not support this operation. * * @since 1.4 */ void setDefaultStratum(String stratum); /** * Return this VM's default stratum. * * @see #setDefaultStratum(String) * @see ReferenceType#defaultStratum() * @return <code>null</code> (meaning that the per-class * default - {@link ReferenceType#defaultStratum()} - * should be used) unless the default stratum has been * set with * {@link #setDefaultStratum(String)}. * * @since 1.4 */ String getDefaultStratum(); /** * Returns the number of instances of each ReferenceType in the 'refTypes' * list. * Only instances that are reachable for the purposes of garbage collection * are counted. * <p> * Not all target virtual machines support this operation. * Use {@link VirtualMachine#canGetInstanceInfo()} * to determine if the operation is supported. * * @see ReferenceType#instances(long) * @see ObjectReference#referringObjects(long) * @param refTypes the list of {@link ReferenceType} objects for which counts * are to be obtained. * * @return an array of <code>long</code> containing one element for each * element in the 'refTypes' list. Element i of the array contains * the number of instances in the target VM of the ReferenceType at * position i in the 'refTypes' list. * If the 'refTypes' list is empty, a zero-length array is returned. * If a ReferenceType in refTypes has been garbage collected, zero * is returned for its instance count. * @throws java.lang.UnsupportedOperationException if * the target virtual machine does not support this * operation - see * {@link VirtualMachine#canGetInstanceInfo() canGetInstanceInfo()} * @throws NullPointerException if the 'refTypes' list is null. * @since 1.6 */ long[] instanceCounts(List<? extends ReferenceType> refTypes); /** * Returns text information on the target VM and the * debugger support that mirrors it. No specific format * for this information is guaranteed. * Typically, this string contains version information for the * target VM and debugger interfaces. * More precise information * on VM and JDI versions is available through * {@link #version}, {@link VirtualMachineManager#majorInterfaceVersion}, * and {@link VirtualMachineManager#minorInterfaceVersion} * * @return the description. */ String description(); /** * Returns the version of the Java Runtime Environment in the target * VM as reported by the property <code>java.version</code>. * For obtaining the JDI interface version, use * {@link VirtualMachineManager#majorInterfaceVersion} * and {@link VirtualMachineManager#minorInterfaceVersion} * * @return the target VM version. */ String version(); /** * Returns the name of the target VM as reported by the * property <code>java.vm.name</code>. * * @return the target VM name. */ String name(); /** All tracing is disabled. */ int TRACE_NONE = 0x00000000; /** Tracing enabled for JDWP packets sent to target VM. */ int TRACE_SENDS = 0x00000001; /** Tracing enabled for JDWP packets received from target VM. */ int TRACE_RECEIVES = 0x00000002; /** Tracing enabled for internal event handling. */ int TRACE_EVENTS = 0x00000004; /** Tracing enabled for internal managment of reference types. */ int TRACE_REFTYPES = 0x00000008; /** Tracing enabled for internal management of object references. */ int TRACE_OBJREFS = 0x00000010; /** All tracing is enabled. */ int TRACE_ALL = 0x00ffffff; /** * Traces the activities performed by the com.sun.jdi implementation. * All trace information is output to System.err. The given trace * flags are used to limit the output to only the information * desired. The given flags are in effect and the corresponding * trace will continue until the next call to * this method. * <p> * Output is implementation dependent and trace mode may be ignored. * * @param traceFlags identifies which kinds of tracing to enable. */ void setDebugTraceMode(int traceFlags);}Lines 501–863 of 863. Previous lines
* * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canGetOwnedMonitorInfo(); /** * Determines if the target VM supports the retrieval * of the monitor for which a thread is currently waiting. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canGetCurrentContendedMonitor(); /** * Determines if the target VM supports the retrieval * of the monitor information for an object. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canGetMonitorInfo(); /** * Determines if the target VM supports filtering * events by specific instance object. For example, * see {@link com.sun.jdi.request.BreakpointRequest#addInstanceFilter}. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. */ boolean canUseInstanceFilters(); /** * Determines if the target VM supports any level * of class redefinition. * @see #redefineClasses * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canRedefineClasses(); /** * Determines if the target VM supports the addition * of methods when performing class redefinition. * @see #redefineClasses * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canAddMethod(); /** * Determines if the target VM supports unrestricted * changes when performing class redefinition. * @see #redefineClasses * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canUnrestrictedlyRedefineClasses(); /** * Determines if the target VM supports popping * frames of a threads stack. * @see ThreadReference#popFrames * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canPopFrames(); /** * Determines if the target VM supports getting * the source debug extension. * @see ReferenceType#sourceDebugExtension * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canGetSourceDebugExtension(); /** * Determines if the target VM supports the creation of * {@link com.sun.jdi.request.VMDeathRequest}s. * @see com.sun.jdi.request.EventRequestManager#createVMDeathRequest * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.4 */ boolean canRequestVMDeathEvent(); /** * Determines if the target VM supports the inclusion of return values * in * {@link com.sun.jdi.event.MethodExitEvent}s. * @see com.sun.jdi.request.EventRequestManager#createMethodExitRequest * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetMethodReturnValues(); /** * Determines if the target VM supports the accessing of class instances, * instance counts, and referring objects. * * @see #instanceCounts * @see ReferenceType#instances(long) * @see ObjectReference#referringObjects(long) * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetInstanceInfo(); /** * Determines if the target VM supports the filtering of * class prepare events by source name. * * see {@link com.sun.jdi.request.ClassPrepareRequest#addSourceNameFilter}. * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canUseSourceNameFilters(); /** * Determines if the target VM supports the forcing of a method to * return early. * * @see ThreadReference#forceEarlyReturn(Value) * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canForceEarlyReturn(); /** * Determines if the target VM is a read-only VM. If a method which * would modify the state of the VM is called on a read-only VM, * then {@link VMCannotBeModifiedException} is thrown. * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.5 */ boolean canBeModified(); /** * Determines if the target VM supports the creation of * {@link com.sun.jdi.request.MonitorContendedEnterRequest}s. * {@link com.sun.jdi.request.MonitorContendedEnteredRequest}s. * {@link com.sun.jdi.request.MonitorWaitRequest}s. * {@link com.sun.jdi.request.MonitorWaitedRequest}s. * @see com.sun.jdi.request.EventRequestManager#createMonitorContendedEnterRequest * @see com.sun.jdi.request.EventRequestManager#createMonitorContendedEnteredRequest * @see com.sun.jdi.request.EventRequestManager#createMonitorWaitRequest * @see com.sun.jdi.request.EventRequestManager#createMonitorWaitedRequest * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canRequestMonitorEvents(); /** * Determines if the target VM supports getting which * frame has acquired a monitor. * @see com.sun.jdi.ThreadReference#ownedMonitorsAndFrames * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetMonitorFrameInfo(); /** * Determines if the target VM supports reading class file * major and minor versions. * * @see ReferenceType#majorVersion() * @see ReferenceType#minorVersion() * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetClassFileVersion(); /** * Determines if the target VM supports getting constant pool * information of a class. * * @see ReferenceType#constantPoolCount() * @see ReferenceType#constantPool() * * @return <code>true</code> if the feature is supported, * <code>false</code> otherwise. * * @since 1.6 */ boolean canGetConstantPool(); /** * Set this VM's default stratum (see {@link Location} for a * discussion of strata). Overrides the per-class default set * in the class file. * <P> * Affects location queries (such as, * {@link Location#sourceName()}) * and the line boundaries used in * single stepping. * * @param stratum the stratum to set as VM default, * or null to use per-class defaults. * * @throws java.lang.UnsupportedOperationException if the * target virtual machine does not support this operation. * * @since 1.4 */ void setDefaultStratum(String stratum); /** * Return this VM's default stratum. * * @see #setDefaultStratum(String) * @see ReferenceType#defaultStratum() * @return <code>null</code> (meaning that the per-class * default - {@link ReferenceType#defaultStratum()} - * should be used) unless the default stratum has been * set with * {@link #setDefaultStratum(String)}. * * @since 1.4 */ String getDefaultStratum(); /** * Returns the number of instances of each ReferenceType in the 'refTypes' * list. * Only instances that are reachable for the purposes of garbage collection * are counted. * <p> * Not all target virtual machines support this operation. * Use {@link VirtualMachine#canGetInstanceInfo()} * to determine if the operation is supported. * * @see ReferenceType#instances(long) * @see ObjectReference#referringObjects(long) * @param refTypes the list of {@link ReferenceType} objects for which counts * are to be obtained. * * @return an array of <code>long</code> containing one element for each * element in the 'refTypes' list. Element i of the array contains * the number of instances in the target VM of the ReferenceType at * position i in the 'refTypes' list. * If the 'refTypes' list is empty, a zero-length array is returned. * If a ReferenceType in refTypes has been garbage collected, zero * is returned for its instance count. * @throws java.lang.UnsupportedOperationException if * the target virtual machine does not support this * operation - see * {@link VirtualMachine#canGetInstanceInfo() canGetInstanceInfo()} * @throws NullPointerException if the 'refTypes' list is null. * @since 1.6 */ long[] instanceCounts(List<? extends ReferenceType> refTypes); /** * Returns text information on the target VM and the * debugger support that mirrors it. No specific format * for this information is guaranteed. * Typically, this string contains version information for the * target VM and debugger interfaces. * More precise information * on VM and JDI versions is available through * {@link #version}, {@link VirtualMachineManager#majorInterfaceVersion}, * and {@link VirtualMachineManager#minorInterfaceVersion} * * @return the description. */ String description(); /** * Returns the version of the Java Runtime Environment in the target * VM as reported by the property <code>java.version</code>. * For obtaining the JDI interface version, use * {@link VirtualMachineManager#majorInterfaceVersion} * and {@link VirtualMachineManager#minorInterfaceVersion} * * @return the target VM version. */ String version(); /** * Returns the name of the target VM as reported by the * property <code>java.vm.name</code>. * * @return the target VM name. */ String name(); /** All tracing is disabled. */ int TRACE_NONE = 0x00000000; /** Tracing enabled for JDWP packets sent to target VM. */ int TRACE_SENDS = 0x00000001; /** Tracing enabled for JDWP packets received from target VM. */ int TRACE_RECEIVES = 0x00000002; /** Tracing enabled for internal event handling. */ int TRACE_EVENTS = 0x00000004; /** Tracing enabled for internal managment of reference types. */ int TRACE_REFTYPES = 0x00000008; /** Tracing enabled for internal management of object references. */ int TRACE_OBJREFS = 0x00000010; /** All tracing is enabled. */ int TRACE_ALL = 0x00ffffff; /** * Traces the activities performed by the com.sun.jdi implementation. * All trace information is output to System.err. The given trace * flags are used to limit the output to only the information * desired. The given flags are in effect and the corresponding * trace will continue until the next call to * this method. * <p> * Output is implementation dependent and trace mode may be ignored. * * @param traceFlags identifies which kinds of tracing to enable. */ void setDebugTraceMode(int traceFlags); }