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  * <p style="font-size:larger">
  49  * <b>Global Exceptions:</b>
  50  * <p>
  51  * This section documents exceptions which apply to the entire API and are thus
  52  * not documented on individual methods.
  53  * <blockquote>
  54  *   <p>
  55  *   <b>{@link com.sun.jdi.VMMismatchException}</b>
  56  *   <p>
  57  *   Any method on a {@link com.sun.jdi.Mirror} that takes a
  58  *   {@code Mirror} as an parameter directly or indirectly (e.g., as a
  59  *   element in a {@code List}) will throw {@link
  60  *   com.sun.jdi.VMMismatchException} if the mirrors are from different virtual
  61  *   machines.
  62  *   <p>
  63  *   <b>{@link java.lang.NullPointerException}</b>
  64  *   <p>
  65  *   Any method which takes a {@link java.lang.Object} as an parameter will
  66  *   throw {@link java.lang.NullPointerException} if null is passed directly or
  67  *   indirectly -- unless null is explicitly mentioned as a valid parameter.
  68  * </blockquote>
  69  * NOTE: The exceptions below may be thrown whenever the specified conditions
  70  * are met but a guarantee that they are thrown only exists when a valid result
  71  * cannot be returned.
  72  * <blockquote>
  73  *   <p>
  74  *   <b>{@link com.sun.jdi.VMDisconnectedException}</b>
  75  *   <p>
  76  *   Any method on {@link com.sun.jdi.ObjectReference}, {@link
  77  *   com.sun.jdi.ReferenceType}, {@link com.sun.jdi.request.EventRequest},
  78  *   {@link com.sun.jdi.StackFrame}, or {@link com.sun.jdi.VirtualMachine} or
  79  *   which takes one of these directly or indirectly as an parameter may throw
  80  *   {@link com.sun.jdi.VMDisconnectedException} if the target VM is
  81  *   disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been
  82  *   or is available to be read from the {@link com.sun.jdi.event.EventQueue}.
  83  *   <p>
  84  *   <b>{@link com.sun.jdi.VMOutOfMemoryException}</b>
  85  *   <p>
  86  *   Any method on {@link com.sun.jdi.ObjectReference}, {@link
  87  *   com.sun.jdi.ReferenceType}, {@link com.sun.jdi.request.EventRequest},
  88  *   {@link com.sun.jdi.StackFrame}, or {@link com.sun.jdi.VirtualMachine} or
  89  *   which takes one of these directly or indirectly as an parameter may throw
  90  *   {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of
  91  *   memory.
  92  *   <p>
  93  *   <b>{@link com.sun.jdi.ObjectCollectedException}</b>
  94  *   <p>
  95  *   Any method on {@link com.sun.jdi.ObjectReference} or which directly or
  96  *   indirectly takes {@code ObjectReference} as parameter may throw
  97  *   {@link com.sun.jdi.ObjectCollectedException} if the mirrored object has
  98  *   been garbage collected.
  99  *   <p>
 100  *   Any method on {@link com.sun.jdi.ReferenceType} or which directly or
 101  *   indirectly takes {@code ReferenceType} as parameter may throw {@link
 102  *   com.sun.jdi.ObjectCollectedException} if the mirrored type has been
 103  *   unloaded.
 104  * </blockquote>
 105  *
 106  * @moduleGraph
 107  * @since 9
 108  */
 109 module jdk.jdi {
 110     requires jdk.attach;
 111     requires jdk.jdwp.agent;
 112 
 113     exports com.sun.jdi;
 114     exports com.sun.jdi.connect;
 115     exports com.sun.jdi.connect.spi;
 116     exports com.sun.jdi.event;
 117     exports com.sun.jdi.request;
 118 
 119     uses com.sun.jdi.connect.Connector;
 120     uses com.sun.jdi.connect.spi.TransportService;
 121 
 122     // windows shared memory connector providers are added at build time
 123     provides com.sun.jdi.connect.Connector with
 124         com.sun.tools.jdi.ProcessAttachingConnector,
 125         com.sun.tools.jdi.RawCommandLineLauncher,
 126         com.sun.tools.jdi.SocketAttachingConnector,
 127         com.sun.tools.jdi.SocketListeningConnector,
 128         com.sun.tools.jdi.SunCommandLineLauncher;
 129 }
 130