src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java
author dholmes
Sat, 23 Jun 2018 01:32:41 -0400
changeset 50735 2f2af62dfac7
parent 47216 71c04702a3d5
permissions -rw-r--r--
8010319: Implementation of JEP 181: Nest-Based Access Control Reviewed-by: alanb, psandoz, mchung, coleenp, acorn, mcimadamore, forax, jlahoda, sspitsyn, abuckley Contributed-by: alex.buckley@oracle.com, maurizio.mimadamore@oracle.com, mandy.chung@oracle.com, tobias.hartmann@oracle.com, david.holmes@oracle.com, vladimir.x.ivanov@oracle.com, karen.kinnear@oracle.com, vladimir.kozlov@oracle.com, john.r.rose@oracle.com, daniel.smith@oracle.com, serguei.spitsyn@oracle.com, kumardotsrinivasan@gmail.com, boris.ulasevich@bell-sw.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
     2
 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package com.sun.jdi;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.List;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.util.Map;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    31
import com.sun.jdi.connect.AttachingConnector;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    32
import com.sun.jdi.connect.Connector;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    33
import com.sun.jdi.connect.LaunchingConnector;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    34
import com.sun.jdi.connect.spi.Connection;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    35
import com.sun.jdi.event.EventQueue;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    36
import com.sun.jdi.event.MethodExitEvent;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    37
import com.sun.jdi.event.VMDisconnectEvent;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    38
import com.sun.jdi.event.VMStartEvent;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    39
import com.sun.jdi.request.BreakpointRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    40
import com.sun.jdi.request.ClassPrepareRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    41
import com.sun.jdi.request.EventRequestManager;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    42
import com.sun.jdi.request.MonitorContendedEnterRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    43
import com.sun.jdi.request.MonitorContendedEnteredRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    44
import com.sun.jdi.request.MonitorWaitRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    45
import com.sun.jdi.request.MonitorWaitedRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    46
import com.sun.jdi.request.VMDeathRequest;
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    47
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * A virtual machine targeted for debugging.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * More precisely, a {@link Mirror mirror} representing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * composite state of the target VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * All other mirrors are associated with an instance of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * interface.  Access to all other mirrors is achieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * directly or indirectly through an instance of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * Access to global VM properties and control of VM execution
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * are supported directly by this interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * Instances of this interface are created by instances of
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    60
 * {@link Connector}. For example,
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    61
 * an {@link AttachingConnector AttachingConnector}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * attaches to a target VM and returns its virtual machine mirror.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * A Connector will typically create a VirtualMachine by invoking
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * the VirtualMachineManager's {@link
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    65
 * VirtualMachineManager#createVirtualMachine(Connection)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * createVirtualMachine(Connection) method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * Note that a target VM launched by a launching connector is not
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    69
 * guaranteed to be stable until after the {@link VMStartEvent} has been
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * received.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * Any method on <code>VirtualMachine</code> which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * takes <code>VirtualMachine</code> as an parameter may throw
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    74
 * {@link VMDisconnectedException} if the target VM is
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    75
 * disconnected and the {@link VMDisconnectEvent} has been or is
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    76
 * available to be read from the {@link EventQueue}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * Any method on <code>VirtualMachine</code> which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * takes <code>VirtualMachine</code> as an parameter may throw
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
    80
 * {@link VMOutOfMemoryException} if the target VM has run out of memory.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * @author Robert Field
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * @author Gordon Hirsch
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * @author James McIlree
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * @since  1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
public interface VirtualMachine extends Mirror {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    /**
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    90
     * Returns all modules. For each module in the target
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    91
     * VM a {@link ModuleReference} will be placed in the returned list.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    92
     * <P>
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    93
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    94
     * Not all target virtual machines support this operation.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    95
     * Use {@link VirtualMachine#canGetModuleInfo()}
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    96
     * to determine if the operation is supported.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    97
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    98
     * @implSpec
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
    99
     * The default implementation throws {@code UnsupportedOperationException}.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   100
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   101
     * @return a list of {@link ModuleReference} objects, each mirroring
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   102
     * a module in the target VM.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   103
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   104
     * @throws java.lang.UnsupportedOperationException if
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   105
     * the target virtual machine does not support this
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   106
     * operation.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   107
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   108
     * @since 9
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   109
     */
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   110
    default List<ModuleReference> allModules() {
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   111
        throw new java.lang.UnsupportedOperationException(
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   112
            "The method allModules() must be implemented");
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   113
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   114
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   115
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * Returns the loaded reference types that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * match a given name. The name must be fully qualified
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * (for example, java.lang.String). The returned list
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * will contain a {@link ReferenceType} for each class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * or interface found with the given name. The search
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * is confined to loaded classes only; no attempt is made
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * to load a class of the given name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * The returned list will include reference types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     * loaded at least to the point of preparation and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * types (like array) for which preparation is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * not defined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * @param className the class/interface name to search for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * @return a list of {@link ReferenceType} objects, each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * mirroring a type in the target VM with the given name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    List<ReferenceType> classesByName(String className);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * Returns all loaded types. For each loaded type in the target
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * VM a {@link ReferenceType} will be placed in the returned list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * The list will include ReferenceTypes which mirror classes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * interfaces, and array types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * The returned list will include reference types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * loaded at least to the point of preparation and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * types (like array) for which preparation is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * not defined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * @return a list of {@link ReferenceType} objects, each mirroring
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * a loaded type in the target VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    List<ReferenceType> allClasses();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * All classes given are redefined according to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * definitions supplied.  A method in a redefined class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * is called 'equivalent' (to the old version of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * method) if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * <LI>their bytecodes are the same except for indicies into
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     *   the constant pool, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * <LI>the referenced constants are equal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * Otherwise, the new method is called 'non-equivalent'.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * If a redefined method has active stack frames, those active
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * frames continue to run the bytecodes of the previous version of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * method.  If the new version of such a method is non-equivalent,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * then a method from one of these active frames is called 'obsolete' and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * {@link Method#isObsolete Method.isObsolete()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * will return true when called on one of these methods.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * If resetting such a frame is desired, use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * {@link ThreadReference#popFrames ThreadReference.popFrames(StackFrame)}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * to pop the old obsolete method execution from the stack.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * New invocations of redefined methods will always invoke the new versions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * This function does not cause any initialization except
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * that which would occur under the customary JVM semantics.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * In other words, redefining a class does not cause
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * its initializers to be run. The values of preexisting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * static variables will remain as they were prior to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * call. However, completely uninitialized (new) static
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * variables will be assigned their default value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * If a redefined class has instances then all those
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * instances will have the fields defined by the redefined
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     * class at the completion of the call. Preexisting fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * will retain their previous values. Any new fields will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     * have their default values; no instance initializers or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * constructors are run.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * Threads need not be suspended.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     * No events are generated by this function.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     * All breakpoints in the redefined classes are deleted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     * Not all target virtual machines support this operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     * Use {@link #canRedefineClasses() canRedefineClasses()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     * to determine if the operation is supported.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * Use {@link #canAddMethod() canAddMethod()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * to determine if the redefinition can add methods.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     * Use {@link #canUnrestrictedlyRedefineClasses() canUnrestrictedlyRedefineClasses()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     * to determine if the redefinition can change the schema,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * delete methods, change the class hierarchy, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     * @param classToBytes A map from {@link ReferenceType}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * to array of byte.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * The bytes represent the new class definition and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * are in Java Virtual Machine class file format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * @throws java.lang.UnsupportedOperationException if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * the target virtual machine does not support this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * <LI>If {@link #canRedefineClasses() canRedefineClasses()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * is false any call of this method will throw this exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * <LI>If {@link #canAddMethod() canAddMethod()} is false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * attempting to add a method will throw this exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * <LI>If {@link #canUnrestrictedlyRedefineClasses()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     *            canUnrestrictedlyRedefineClasses()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     * is false, attempting any of the following will throw
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * this exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     *   <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     *   <LI>changing the schema (the fields)
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   222
     *   <LI>changing the hierarchy (superclasses, interfaces)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     *   <LI>deleting a method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     *   <LI>changing class modifiers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     *   <LI>changing method modifiers
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   226
     *   <LI>changing the {@code NestHost} or {@code NestMembers} class attributes
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     *   </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * @throws java.lang.NoClassDefFoundError if the bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * don't correspond to the reference type (the names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * don't match).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     * @throws java.lang.VerifyError if a "verifier" detects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * that a class, though well formed, contains an internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * inconsistency or security problem.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     * @throws java.lang.ClassFormatError if the bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     * do not represent a valid class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * @throws java.lang.ClassCircularityError if a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * circularity has been detected while initializing a class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * @throws java.lang.UnsupportedClassVersionError if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * major and minor version numbers in bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * are not supported by the VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
     * @see Method#isObsolete
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     * @see ThreadReference#popFrames
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     * @see #canRedefineClasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     * @see #canAddMethod
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * @see #canUnrestrictedlyRedefineClasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    void redefineClasses(Map<? extends ReferenceType,byte[]> classToBytes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * Returns a list of the currently running threads. For each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * running thread in the target VM, a {@link ThreadReference}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * that mirrors it is placed in the list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * The returned list contains threads created through
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * java.lang.Thread, all native threads attached to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * the target VM through JNI, and system threads created
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     * by the target VM. Thread objects that have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     * not yet been started
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * (see {@link java.lang.Thread#start Thread.start()})
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     * and thread objects that have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     * completed their execution are not included in the returned list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     * @return a list of {@link ThreadReference} objects, one for each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * running thread in the mirrored VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    List<ThreadReference> allThreads();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
     * Suspends the execution of the application running in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
     * virtual machine. All threads currently running will be suspended.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     * Unlike {@link java.lang.Thread#suspend Thread.suspend()},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * suspends of both the virtual machine and individual threads are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * counted. Before a thread will run again, it must be resumed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * (through {@link #resume} or {@link ThreadReference#resume})
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     * the same number of times it has been suspended.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
    void suspend();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * Continues the execution of the application running in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * virtual machine. All threads are resumed as documented in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     * {@link ThreadReference#resume}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     * @see #suspend
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
    void resume();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     * Returns each thread group which does not have a parent. For each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     * top level thread group a {@link ThreadGroupReference} is placed in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     * returned list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     * This command may be used as the first step in building a tree
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * (or trees) of the existing thread groups.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     * @return a list of {@link ThreadGroupReference} objects, one for each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
     * top level thread group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
    List<ThreadGroupReference> topLevelThreadGroups();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     * Returns the event queue for this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     * A virtual machine has only one {@link EventQueue} object, this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     * method will return the same instance each time it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     * is invoked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
     * @return the {@link EventQueue} for this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    EventQueue eventQueue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     * Returns the event request manager for this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
     * The {@link EventRequestManager} controls user settable events
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     * such as breakpoints.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * A virtual machine has only one {@link EventRequestManager} object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     * this method will return the same instance each time it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * is invoked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     * @return the {@link EventRequestManager} for this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
    EventRequestManager eventRequestManager();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
     * Creates a {@link BooleanValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
     * @param value a boolean for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
     * @return the {@link BooleanValue} for the given boolean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
    BooleanValue mirrorOf(boolean value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
     * Creates a {@link ByteValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
     * @param value a byte for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     * @return the {@link ByteValue} for the given byte.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
    ByteValue mirrorOf(byte value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
     * Creates a {@link CharValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     * @param value a char for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * @return the {@link CharValue} for the given char.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
    CharValue mirrorOf(char value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
     * Creates a {@link ShortValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
     * @param value a short for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
     * @return the {@link ShortValue} for the given short.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
    ShortValue mirrorOf(short value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
     * Creates an {@link IntegerValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
     * @param value an int for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
     * @return the {@link IntegerValue} for the given int.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    IntegerValue mirrorOf(int value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
     * Creates a {@link LongValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
     * @param value a long for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
     * @return the {@link LongValue} for the given long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
    LongValue mirrorOf(long value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
     * Creates a {@link FloatValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
     * @param value a float for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
     * @return the {@link FloatValue} for the given float.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    FloatValue mirrorOf(float value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
     * Creates a {@link DoubleValue} for the given value. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     * can be used for setting and comparing against a value retrieved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     * from a variable or field in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     * @param value a double for which to create the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
     * @return the {@link DoubleValue} for the given double.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
    DoubleValue mirrorOf(double value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
     * Creates a string in this virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
     * The created string can be used for setting and comparing against
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
     * a string value retrieved from a variable or field in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
     * virtual machine.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
     * @param value the string to be created
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
     * @return a {@link StringReference} that mirrors the newly created
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
     * string in the target VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
     * -see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
    StringReference mirrorOf(String value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
     * Creates a {@link VoidValue}.  This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
     * can be passed to {@link ThreadReference#forceEarlyReturn}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
     * when a void method is to be exited.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
     * @return the {@link VoidValue}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
    VoidValue mirrorOfVoid();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
     * Returns the {@link java.lang.Process} object for this
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   448
     * virtual machine if launched by a {@link LaunchingConnector}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
     * @return the {@link java.lang.Process} object for this virtual
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   451
     * machine, or null if it was not launched by a {@link LaunchingConnector}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
     * -see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
    Process process();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
     * Invalidates this virtual machine mirror.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
     * The communication channel to the target VM is closed, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     * the target VM prepares to accept another subsequent connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     * from this debugger or another debugger, including the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
     * following tasks:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     * <li>All event requests are cancelled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     * <li>All threads suspended by {@link #suspend} or by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     * {@link ThreadReference#suspend} are resumed as many
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     * times as necessary for them to run.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * <li>Garbage collection is re-enabled in all cases where it was
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     * disabled through {@link ObjectReference#disableCollection}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     * Any current method invocations executing in the target VM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     * are continued after the disconnection. Upon completion of any such
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
     * method invocation, the invoking thread continues from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
     * location where it was originally stopped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
     * Resources originating in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
     * this VirtualMachine (ObjectReferences, ReferenceTypes, etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * will become invalid.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
    void dispose();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
     * Causes the mirrored VM to terminate with the given error code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
     * All resources associated with this VirtualMachine are freed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
     * If the mirrored VM is remote, the communication channel
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
     * to it will be closed. Resources originating in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
     * this VirtualMachine (ObjectReferences, ReferenceTypes, etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
     * will become invalid.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
     * Threads running in the mirrored VM are abruptly terminated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
     * A thread death exception is not thrown and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
     * finally blocks are not run.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
     * @param exitCode the exit code for the target VM.  On some platforms,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
     * the exit code might be truncated, for example, to the lower order 8 bits.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    void exit(int exitCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     * Determines if the target VM supports watchpoints
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
     * for field modification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
    boolean canWatchFieldModification();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
     * Determines if the target VM supports watchpoints
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
     * for field access.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
    boolean canWatchFieldAccess();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     * Determines if the target VM supports the retrieval
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
     * of a method's bytecodes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
    boolean canGetBytecodes();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * Determines if the target VM supports the query
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     * of the synthetic attribute of a method or field.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
    boolean canGetSyntheticAttribute();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     * Determines if the target VM supports the retrieval
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     * of the monitors owned by a thread.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
    boolean canGetOwnedMonitorInfo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     * Determines if the target VM supports the retrieval
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * of the monitor for which a thread is currently waiting.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
    boolean canGetCurrentContendedMonitor();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
     * Determines if the target VM supports the retrieval
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
     * of the monitor information for an object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
    boolean canGetMonitorInfo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     * Determines if the target VM supports filtering
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * events by specific instance object.  For example,
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   567
     * see {@link BreakpointRequest#addInstanceFilter}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
    boolean canUseInstanceFilters();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
     * Determines if the target VM supports any level
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     * of class redefinition.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     * @see #redefineClasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
    boolean canRedefineClasses();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
     * Determines if the target VM supports the addition
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
     * of methods when performing class redefinition.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
     * @see #redefineClasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
    boolean canAddMethod();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
    /**
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   599
     * Determines if the target VM supports
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   600
     * changes when performing class redefinition that are
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47216
diff changeset
   601
     * otherwise restricted by {@link #redefineClasses}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
     * @see #redefineClasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
    boolean canUnrestrictedlyRedefineClasses();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
     * Determines if the target VM supports popping
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
     * frames of a threads stack.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
     * @see ThreadReference#popFrames
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
    boolean canPopFrames();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
     * Determines if the target VM supports getting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
     * the source debug extension.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
     * @see ReferenceType#sourceDebugExtension
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
    boolean canGetSourceDebugExtension();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
     * Determines if the target VM supports the creation of
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   637
     * {@link VMDeathRequest}s.
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   638
     * @see EventRequestManager#createVMDeathRequest
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
    boolean canRequestVMDeathEvent();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
     * Determines if the target VM supports the inclusion of return values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
     * in
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   650
     * {@link MethodExitEvent}s.
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   651
     * @see EventRequestManager#createMethodExitRequest
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
    boolean canGetMethodReturnValues();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
     * Determines if the target VM supports the accessing of class instances,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
     * instance counts, and referring objects.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
     * @see #instanceCounts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
     * @see ReferenceType#instances(long)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
     * @see ObjectReference#referringObjects(long)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
    boolean canGetInstanceInfo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
     * Determines if the target VM supports the filtering of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
     * class prepare events by source name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
     *
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   679
     * see {@link ClassPrepareRequest#addSourceNameFilter}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
    boolean canUseSourceNameFilters();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
     * Determines if the target VM supports the forcing of a method to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
     * return early.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
     * @see ThreadReference#forceEarlyReturn(Value)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
    boolean canForceEarlyReturn();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
     * Determines if the target VM is a read-only VM.  If a method which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
     * would modify the state of the VM is called on a read-only VM,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
     * then {@link VMCannotBeModifiedException} is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
     * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
    boolean canBeModified();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
     * Determines if the target VM supports the creation of
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   715
     * {@link MonitorContendedEnterRequest}s.
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   716
     * {@link MonitorContendedEnteredRequest}s.
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   717
     * {@link MonitorWaitRequest}s.
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   718
     * {@link MonitorWaitedRequest}s.
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   719
     * @see EventRequestManager#createMonitorContendedEnterRequest
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   720
     * @see EventRequestManager#createMonitorContendedEnteredRequest
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   721
     * @see EventRequestManager#createMonitorWaitRequest
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   722
     * @see EventRequestManager#createMonitorWaitedRequest
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
    boolean canRequestMonitorEvents();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
     * Determines if the target VM supports getting which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
     * frame has acquired a monitor.
45564
0149773a140c 8181417: Code cleanups in com.sun.jdi
clanger
parents: 36511
diff changeset
   735
     * @see ThreadReference#ownedMonitorsAndFrames
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
     boolean canGetMonitorFrameInfo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
     * Determines if the target VM supports reading class file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
     * major and minor versions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
     * @see ReferenceType#majorVersion()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
     * @see ReferenceType#minorVersion()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
    boolean canGetClassFileVersion();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
     * Determines if the target VM supports getting constant pool
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
     * information of a class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
     * @see ReferenceType#constantPoolCount()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
     * @see ReferenceType#constantPool()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
     * @return <code>true</code> if the feature is supported,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
     * <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
    boolean canGetConstantPool();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
    /**
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   775
     * Determines if the target VM supports getting information about modules.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   776
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   777
     * @return {@code true} if the feature is supported, {@code false} otherwise
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   778
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   779
     * @implSpec
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   780
     * The default implementation returns {@code false}.
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   781
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   782
     * @see VirtualMachine#allModules()
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   783
     * @see ReferenceType#module()
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   784
     * @see ModuleReference
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   785
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   786
     * @since 9
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   787
     */
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   788
    default boolean canGetModuleInfo() {
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   789
        return false;
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   790
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   791
9d0388c6b336 8142968: Module System implementation
alanb
parents: 34894
diff changeset
   792
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
     * Set this VM's default stratum (see {@link Location} for a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
     * discussion of strata).  Overrides the per-class default set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
     * in the class file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
     * Affects location queries (such as,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
     * {@link Location#sourceName()})
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
     * and the line boundaries used in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
     * single stepping.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
     * @param stratum the stratum to set as VM default,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
     * or null to use per-class defaults.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
     * @throws java.lang.UnsupportedOperationException if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
     * target virtual machine does not support this operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
    void setDefaultStratum(String stratum);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
     * Return this VM's default stratum.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
     * @see #setDefaultStratum(String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
     * @see ReferenceType#defaultStratum()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
     * @return <code>null</code> (meaning that the per-class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
     * default - {@link ReferenceType#defaultStratum()} -
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
     * should be used) unless the default stratum has been
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
     * set with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
     * {@link #setDefaultStratum(String)}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
    String getDefaultStratum();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
     * Returns the number of instances of each ReferenceType in the 'refTypes'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
     * list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
     * Only instances that are reachable for the purposes of garbage collection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
     * are counted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
     * Not all target virtual machines support this operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
     * Use {@link VirtualMachine#canGetInstanceInfo()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
     * to determine if the operation is supported.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
     * @see ReferenceType#instances(long)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
     * @see ObjectReference#referringObjects(long)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
     * @param refTypes the list of {@link ReferenceType} objects for which counts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
     *        are to be obtained.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
     * @return an array of <code>long</code> containing one element for each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
     *         element in the 'refTypes' list.  Element i of the array contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
     *         the number of instances in the target VM of the ReferenceType at
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
     *         position i in the 'refTypes' list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
     *         If the 'refTypes' list is empty, a zero-length array is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
     *         If a ReferenceType in refTypes has been garbage collected, zero
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
     *         is returned for its instance count.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
     * @throws java.lang.UnsupportedOperationException if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
     * the target virtual machine does not support this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
     * operation - see
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
     * {@link VirtualMachine#canGetInstanceInfo() canGetInstanceInfo()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
     * @throws NullPointerException if the 'refTypes' list is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
    long[] instanceCounts(List<? extends ReferenceType> refTypes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
     * Returns text information on the target VM and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
     * debugger support that mirrors it. No specific format
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
     * for this information is guaranteed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
     * Typically, this string contains version information for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
     * target VM and debugger interfaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
     * More precise information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
     * on VM and JDI versions is available through
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
     * {@link #version}, {@link VirtualMachineManager#majorInterfaceVersion},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
     * and {@link VirtualMachineManager#minorInterfaceVersion}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
     * @return the description.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
    String description();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
     * Returns the version of the Java Runtime Environment in the target
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
     * VM as reported by the property <code>java.version</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
     * For obtaining the JDI interface version, use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
     * {@link VirtualMachineManager#majorInterfaceVersion}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
     * and {@link VirtualMachineManager#minorInterfaceVersion}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
     * @return the target VM version.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
    String version();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
     * Returns the name of the target VM as reported by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
     * property <code>java.vm.name</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
     * @return the target VM name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
    String name();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
    /** All tracing is disabled. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
    int TRACE_NONE        = 0x00000000;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
    /** Tracing enabled for JDWP packets sent to target VM. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
    int TRACE_SENDS       = 0x00000001;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
    /** Tracing enabled for JDWP packets received from target VM. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
    int TRACE_RECEIVES    = 0x00000002;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
    /** Tracing enabled for internal event handling. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
    int TRACE_EVENTS      = 0x00000004;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
    /** Tracing enabled for internal managment of reference types. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
    int TRACE_REFTYPES    = 0x00000008;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
    /** Tracing enabled for internal management of object references. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
    int TRACE_OBJREFS      = 0x00000010;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
    /** All tracing is enabled. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
    int TRACE_ALL         = 0x00ffffff;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
     * Traces the activities performed by the com.sun.jdi implementation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
     * All trace information is output to System.err. The given trace
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
     * flags are used to limit the output to only the information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
     * desired. The given flags are in effect and the corresponding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
     * trace will continue until the next call to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
     * this method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
     * Output is implementation dependent and trace mode may be ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
     * @param traceFlags identifies which kinds of tracing to enable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
    void setDebugTraceMode(int traceFlags);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
}