1 /*
   2  * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /**
  27  * Defines the Java Debug Interface.
  28  * <p>
  29  * The Java&trade; Debug Interface (JDI) is a high level Java API providing
  30  * information useful for debuggers and similar systems needing access to the
  31  * running state of a (usually remote) virtual machine.
  32  * <p>
  33  * JDI provides introspective access to a running virtual machine's state,
  34  * Class, Array, Interface, and primitive types, and instances of those types.
  35  * <p>
  36  * JDI also provides explicit control over a virtual machine's execution.
  37  * The ability to suspend and resume threads, and to set breakpoints,
  38  * watchpoints, etc. Notification of exceptions, class loading, thread
  39  * creation, etc. The ability to inspect a suspended thread's state, local
  40  * variables, stack backtrace, etc.
  41  * <p>
  42  * JDI is the highest-layer of the Java Platform Debugger Architecture (JPDA).
  43  * For more information on the Java Platform Debugger Architecture, see the <a
  44  * href="{@docRoot}/../../../../technotes/guides/jpda/index.html"> Java
  45  * Platform Debugger Architecture documentation</a> for this release and the <a
  46  * href="http://java.sun.com/products/jpda">Java Platform Debugger Architecture
  47  * website</a>.
  48  * <h3>Global Exceptions</h3>
  49  * <p>
  50  * This section documents exceptions which apply to the entire API and are thus
  51  * not documented on individual methods.
  52  * <blockquote>
  53  *   <p>
  54  *   <b>{@link com.sun.jdi.VMMismatchException}</b>
  55  *   <p>
  56  *   Any method on a {@link com.sun.jdi.Mirror} that takes a
  57  *   {@code Mirror} as an parameter directly or indirectly (e.g., as a
  58  *   element in a {@code List}) will throw {@link
  59  *   com.sun.jdi.VMMismatchException} if the mirrors are from different virtual
  60  *   machines.
  61  *   <p>
  62  *   <b>{@link java.lang.NullPointerException}</b>
  63  *   <p>
  64  *   Any method which takes a {@link java.lang.Object} as an parameter will
  65  *   throw {@link java.lang.NullPointerException} if null is passed directly or
  66  *   indirectly -- unless null is explicitly mentioned as a valid parameter.
  67  * </blockquote>
  68  * NOTE: The exceptions below may be thrown whenever the specified conditions
  69  * are met but a guarantee that they are thrown only exists when a valid result
  70  * cannot be returned.
  71  * <blockquote>
  72  *   <p>
  73  *   <b>{@link com.sun.jdi.VMDisconnectedException}</b>
  74  *   <p>
  75  *   Any method on {@link com.sun.jdi.ObjectReference}, {@link
  76  *   com.sun.jdi.ReferenceType}, {@link com.sun.jdi.request.EventRequest},
  77  *   {@link com.sun.jdi.StackFrame}, or {@link com.sun.jdi.VirtualMachine} or
  78  *   which takes one of these directly or indirectly as an parameter may throw
  79  *   {@link com.sun.jdi.VMDisconnectedException} if the target VM is
  80  *   disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been
  81  *   or is available to be read from the {@link com.sun.jdi.event.EventQueue}.
  82  *   <p>
  83  *   <b>{@link com.sun.jdi.VMOutOfMemoryException}</b>
  84  *   <p>
  85  *   Any method on {@link com.sun.jdi.ObjectReference}, {@link
  86  *   com.sun.jdi.ReferenceType}, {@link com.sun.jdi.request.EventRequest},
  87  *   {@link com.sun.jdi.StackFrame}, or {@link com.sun.jdi.VirtualMachine} or
  88  *   which takes one of these directly or indirectly as an parameter may throw
  89  *   {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of
  90  *   memory.
  91  *   <p>
  92  *   <b>{@link com.sun.jdi.ObjectCollectedException}</b>
  93  *   <p>
  94  *   Any method on {@link com.sun.jdi.ObjectReference} or which directly or
  95  *   indirectly takes {@code ObjectReference} as parameter may throw
  96  *   {@link com.sun.jdi.ObjectCollectedException} if the mirrored object has
  97  *   been garbage collected.
  98  *   <p>
  99  *   Any method on {@link com.sun.jdi.ReferenceType} or which directly or
 100  *   indirectly takes {@code ReferenceType} as parameter may throw {@link
 101  *   com.sun.jdi.ObjectCollectedException} if the mirrored type has been
 102  *   unloaded.
 103  * </blockquote>
 104  *
 105  * <h3>jdb</h3>
 106  *
 107  * <em>{@index jdb jdb}</em> is a simple command-line debugger provided 
 108  * in this module.
 109  *
 110  * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
 111  * <dt class="simpleTagLabel">Tool Guides:
 112  * <dd>{@extLink jdb_tool_reference jdb}
 113  * </dl>
 114  *
 115  * @provides com.sun.jdi.connect.Connector
 116  *
 117  * @uses com.sun.jdi.connect.Connector
 118  * @uses com.sun.jdi.connect.spi.TransportService
 119  *
 120  * @moduleGraph
 121  * @since 9
 122  */
 123 module jdk.jdi {
 124     requires jdk.attach;
 125     requires jdk.jdwp.agent;
 126 
 127     exports com.sun.jdi;
 128     exports com.sun.jdi.connect;
 129     exports com.sun.jdi.connect.spi;
 130     exports com.sun.jdi.event;
 131     exports com.sun.jdi.request;
 132 
 133     uses com.sun.jdi.connect.Connector;
 134     uses com.sun.jdi.connect.spi.TransportService;
 135 
 136     // windows shared memory connector providers are added at build time
 137     provides com.sun.jdi.connect.Connector with
 138         com.sun.tools.jdi.ProcessAttachingConnector,
 139         com.sun.tools.jdi.RawCommandLineLauncher,
 140         com.sun.tools.jdi.SocketAttachingConnector,
 141         com.sun.tools.jdi.SocketListeningConnector,
 142         com.sun.tools.jdi.SunCommandLineLauncher;
 143 }
 144