feat(jdk8): move files to new folder to avoid resources compiled.

This commit is contained in:
2025-09-07 15:25:52 +08:00
parent 3f0047bf6f
commit 8c35cfb1c0
17415 changed files with 217 additions and 213 deletions

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a field access in the target VM. Field modifications
* are not considered field accesses.
*
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface AccessWatchpointEvent extends WatchpointEvent {
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
import java.util.List;
/**
* Notification of a breakpoint in the target VM.
* The breakpoint event
* is generated before the code at its location is executed.
* When a location
* is reached which satisfies a currently enabled
* {@link com.sun.jdi.request.BreakpointRequest breakpoint request},
* an {@link EventSet event set}
* containing an instance of this class will be added
* to the VM's event queue.
*
* @see EventQueue
* @see VirtualMachine
* @see com.sun.jdi.request.BreakpointRequest
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface BreakpointEvent extends LocatableEvent {
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a class prepare in the target VM. See the JVM
* specification for a definition of class preparation. Class prepare
* events are not generated for primtiive classes (for example,
* java.lang.Integer.TYPE).
*
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface ClassPrepareEvent extends Event {
/**
* Returns the thread in which this event has occurred.
* <p>
* In rare cases, this event may occur in a debugger system
* thread within the target VM. Debugger threads take precautions
* to prevent these events, but they cannot be avoided under some
* conditions, especially for some subclasses of
* {@link java.lang.Error}.
* If the event was generated by a debugger system thread, the
* value returned by this method is null, and if the requested
* suspend policy for the event was
* {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD},
* all threads will be suspended instead, and the
* {@link EventSet#suspendPolicy} will reflect this change.
* <p>
* Note that the discussion above does not apply to system threads
* created by the target VM during its normal (non-debug) operation.
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM, or null in the rare cases described above.
*/
public ThreadReference thread();
/**
* Returns the reference type for which this event was generated.
*
* @return a {@link ReferenceType} which mirrors the class, interface, or
* array which has been linked.
*/
public ReferenceType referenceType();
}

View File

@@ -0,0 +1,53 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a class unload in the target VM.
* <p>
* There are severe constraints on the debugger back-end during
* garbage collection, so unload information is greatly limited.
*
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface ClassUnloadEvent extends Event {
/**
* Returns the name of the class that has been unloaded.
*/
public String className();
/**
* Returns the JNI-style signature of the class that has been unloaded.
*/
public String classSignature();
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
import com.sun.jdi.request.EventRequest;
/**
* An occurrence in a target VM that is of interest to a debugger. Event is
* the common superinterface for all events (examples include
* {@link BreakpointEvent}, {@link ExceptionEvent},
* {@link ClassPrepareEvent}).
* When an event occurs, an instance of Event as a component of
* an {@link EventSet} is enqueued in the
* {@link VirtualMachine}'s {@link EventQueue}.
*
* @see EventSet
* @see EventQueue
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface Event extends Mirror {
/**
* @return The {@link EventRequest} that requested this event.
* Some events (eg. {@link VMDeathEvent}) may not have
* a cooresponding request and thus will return null.
*/
EventRequest request();
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
import java.util.Iterator;
/**
* EventIterators are unmodifiable.
*
* @see Event
* @see EventSet
* @see EventSet#iterator
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface EventIterator extends Iterator<Event> {
/**
* @return The next {@link Event} in an {@link EventSet}.
*/
Event nextEvent();
}

View File

@@ -0,0 +1,89 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Manager of incoming debugger events for a target VM.
* Events are always grouped in {@link EventSet}s.
* EventSets generated by the debugger back end can be read
* here. There is one instance of EventQueue assigned to a particular
* {@link com.sun.jdi.VirtualMachine VirtualMachine}.
* <P>
* Some events cause the suspension of the target VM - event requests
* ({@link com.sun.jdi.request}) with a
* {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy}
* of {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL}
* or {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD
* SUSPEND_EVENT_THREAD} and sometimes
* {@link VMStartEvent}.
* If these suspensions are not resumed the target VM will hang.
* Thus, it is always good policy to
* {@link #remove() remove()} every EventSet from the
* event queue until an EventSet containing a
* {@link VMDisconnectEvent} is read.
* Unless {@link com.sun.jdi.VirtualMachine#resume() resume} is
* being handled in another way, each EventSet should invoke
* {@link EventSet#resume()}.
*
* @see EventSet
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface EventQueue extends Mirror {
/**
* Waits forever for the next available event.
*
* @return the next {@link EventSet}.
* @throws InterruptedException if any thread has interrupted
* this thread.
* @throws com.sun.jdi.VMDisconnectedException if the connection
* to the target VM is no longer available. Note this will always
* be preceded by a {@link com.sun.jdi.event.VMDisconnectEvent}.
*/
EventSet remove() throws InterruptedException;
/**
* Waits a specified time for the next available event.
*
* @param timeout Time in milliseconds to wait for the next event
* @return the next {@link EventSet}, or null if there is a timeout.
* @throws InterruptedException if any thread has interrupted
* this thread.
* @throws com.sun.jdi.VMDisconnectedException if the connection
* to the target VM is no longer available. Note this will always
* be preceded by a {@link com.sun.jdi.event.VMDisconnectEvent}.
* @throws IllegalArgumentException if the timeout argument
* contains an illegal value.
*/
EventSet remove(long timeout) throws InterruptedException;
}

View File

@@ -0,0 +1,172 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
import java.util.Set;
/**
* Several {@link Event} objects may be created at a given time by
* the target {@link VirtualMachine}. For example, there may be
* more than one {@link com.sun.jdi.request.BreakpointRequest}
* for a given {@link Location}
* or you might single step to the same location as a
* BreakpointRequest. These {@link Event} objects are delivered
* together as an EventSet. For uniformity, an EventSet is always used
* to deliver {@link Event} objects. EventSets are delivered by
* the {@link EventQueue}.
* EventSets are unmodifiable.
* <P>
* Associated with the issuance of an event set, suspensions may
* have occurred in the target VM. These suspensions correspond
* with the {@link #suspendPolicy() suspend policy}.
* To assure matching resumes occur, it is recommended,
* where possible,
* to complete the processing of an event set with
* {@link #resume() EventSet.resume()}.
* <P>
* The events that are grouped in an EventSet are restricted in the
* following ways:
* <P>
* <UL>
* <LI>Always singleton sets:
* <UL>
* <LI>{@link VMStartEvent}
* <LI>{@link VMDisconnectEvent}
* </UL>
* <LI>Only with other VMDeathEvents:
* <UL>
* <LI>{@link VMDeathEvent}
* </UL>
* <LI>Only with other ThreadStartEvents for the same thread:
* <UL>
* <LI>{@link ThreadStartEvent}
* </UL>
* <LI>Only with other ThreadDeathEvents for the same thread:
* <UL>
* <LI>{@link ThreadDeathEvent}
* </UL>
* <LI>Only with other ClassPrepareEvents for the same class:
* <UL>
* <LI>{@link ClassPrepareEvent}
* </UL>
* <LI>Only with other ClassUnloadEvents for the same class:
* <UL>
* <LI>{@link ClassUnloadEvent}
* </UL>
* <LI>Only with other AccessWatchpointEvents for the same field access:
* <UL>
* <LI>{@link AccessWatchpointEvent}
* </UL>
* <LI>Only with other ModificationWatchpointEvents for the same field
* modification:
* <UL>
* <LI>{@link ModificationWatchpointEvent}
* </UL>
* <LI>Only with other ExceptionEvents for the same exception occurrance:
* <UL>
* <LI>{@link ExceptionEvent}
* </UL>
* <LI>Only with other MethodExitEvents for the same method exit:
* <UL>
* <LI>{@link MethodExitEvent}
* </UL>
* <LI>Only with other Monitor contended enter events for the same monitor object:
* <UL>
* <LI>Monitor Contended Enter Event
* </UL>
* <LI>Only with other Monitor contended entered events for the same monitor object:
* <UL>
* <LI>Monitor Contended Entered Event
* </UL>
* <LI>Only with other Monitor wait events for the same monitor object:
* <UL>
* <LI>Monitor Wait Event
* </UL>
* <LI>Only with other Monitor waited events for the same monitor object:
* <UL>
* <LI>Monitor Waited Event
* </UL>
* <LI>Only with other members of this group, at the same location
* and in the same thread:
* <UL>
* <LI>{@link BreakpointEvent}
* <LI>{@link StepEvent}
* <LI>{@link MethodEntryEvent}
* </UL>
* </UL>
*
* @see Event
* @see EventQueue
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface EventSet extends Mirror, Set<Event> {
/**
* Returns the policy used to suspend threads in the target VM
* for this event set. This policy is selected from the suspend
* policies for each event's request; the target VM chooses the
* policy which suspends the most threads. The target VM
* suspends threads according to that policy
* and that policy is returned here. See
* {@link com.sun.jdi.request.EventRequest} for the possible
* policy values.
* <p>
* In rare cases, the suspend policy may differ from the requested
* value if a {@link ClassPrepareEvent} has occurred in a
* debugger system thread. See {@link ClassPrepareEvent#thread}
* for details.
*
* @return the suspendPolicy which is either
* {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL},
* {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD SUSPEND_EVENT_THREAD} or
* {@link com.sun.jdi.request.EventRequest#SUSPEND_NONE SUSPEND_NONE}.
*/
int suspendPolicy();
/**
* Return an iterator specific to {@link Event} objects.
*/
EventIterator eventIterator();
/**
* Resumes threads suspended by this event set. If the {@link #suspendPolicy}
* is {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL}, a call
* to this method is equivalent to
* {@link com.sun.jdi.VirtualMachine#resume}. If the
* suspend policy is
* {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD},
* a call to this method is equivalent to
* {@link com.sun.jdi.ThreadReference#resume} for the event thread.
* Otherwise, a call to this method is a no-op.
*/
void resume();
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of an exception in the target VM. When an exception
* is thrown which satisfies a currently enabled
* {@link com.sun.jdi.request.ExceptionRequest exception request},
* an {@link EventSet event set}
* containing an instance of this class will be added
* to the VM's event queue.
* If the exception is thrown from a non-native method,
* the exception event is generated at the location where the
* exception is thrown.
* If the exception is thrown from a native method, the exception event
* is generated at the first non-native location reached after the exception
* is thrown.
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface ExceptionEvent extends LocatableEvent {
/**
* Gets the thrown exception object. The exception object is
* an instance of {@link java.lang.Throwable} or a subclass in the
* target VM.
*
* @return an {@link ObjectReference} which mirrors the thrown object in
* the target VM.
*/
public ObjectReference exception();
/**
* Gets the location where the exception will be caught. An exception
* is considered to be caught if, at the point of the throw, the
* current location is dynamically enclosed in a try statement that
* handles the exception. (See the JVM specification for details).
* If there is such a try statement, the catch location is the
* first code index of the appropriate catch clause.
* <p>
* If there are native methods in the call stack at the time of the
* exception, there are important restrictions to note about the
* returned catch location. In such cases,
* it is not possible to predict whether an exception will be handled
* by some native method on the call stack.
* Thus, it is possible that exceptions considered uncaught
* here will, in fact, be handled by a native method and not cause
* termination of the target VM. Furthermore, it cannot be assumed that the
* catch location returned here will ever be reached by the throwing
* thread. If there is
* a native frame between the current location and the catch location,
* the exception might be handled and cleared in that native method
* instead.
* <p>
* Note that the compiler can generate try-catch blocks in some cases
* where they are not explicit in the source code; for example,
* the code generated for <code>synchronized</code> and
* <code>finally</code> blocks can contain implicit try-catch blocks.
* If such an implicitly generated try-catch is
* present on the call stack at the time of the throw, the exception
* will be considered caught even though it appears to be uncaught from
* examination of the source code.
*
* @return the {@link Location} where the exception will be caught or null if
* the exception is uncaught.
*/
public Location catchLocation();
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
import java.util.List;
/**
* Abstract superinterface of events which have both location
* and thread.
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface LocatableEvent extends Event, Locatable {
/**
* Returns the thread in which this event has occurred.
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a method invocation in the target VM. This event
* occurs after entry into the invoked method and before any
* code has executed.
* Method entry events are generated for both native and non-native
* methods.
* <P>
* In some VMs method entry events can occur for a particular thread
* before its {@link ThreadStartEvent} occurs if methods are called
* as part of the thread's initialization.
*
* @see EventQueue
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface MethodEntryEvent extends LocatableEvent {
/**
* Returns the method that was entered.
*
* @return a {@link Method} which mirrors the method that was entered.
*/
public Method method();
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a method return in the target VM. This event
* is generated after all code in the method has executed, but the
* location of this event is the last executed location in the method.
* Method exit events are generated for both native and non-native
* methods. Method exit events are not generated if the method terminates
* with a thrown exception.
*
* @see EventQueue
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface MethodExitEvent extends LocatableEvent {
/**
* Returns the method that was exited.
*
* @return a {@link Method} which mirrors the method that was exited.
* @throws ObjectCollectedException may be thrown if class
* has been garbage collected.
*/
public Method method();
/**
* Returns the value that the method will return.
*
* Not all target virtual machines support this operation.
* Use
* {@link VirtualMachine#canGetMethodReturnValues() canGetMethodReturnValues()}
* to determine if this operation is supported.
*
* @return a {@link Value} which mirrors the value to be returned.
*
* @throws java.lang.UnsupportedOperationException if
* the target virtual machine does not support this
* operation - see
* {@link VirtualMachine#canGetMethodReturnValues() canGetMethodReturnValues()}
*
* @since 1.6
*/
public Value returnValue();
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a field modification in the
* target VM.
*
* @see EventQueue
* @see VirtualMachine
* @see com.sun.jdi.request.ModificationWatchpointRequest
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface ModificationWatchpointEvent extends WatchpointEvent {
/**
* Value that will be assigned to the field when the instruction
* completes.
*/
Value valueToBe();
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
*
* Notification that a thread in the target VM is attempting
* to enter a monitor that is already acquired by another thread.
* <P>
*
* @see EventQueue
* @see MonitorContendedEnteredEvent
*
*
* @author Swamy Venkataramanappa
* @since 1.6
*/
@jdk.Exported
public interface MonitorContendedEnterEvent extends LocatableEvent {
/**
* Returns the thread in which this event has occurred.
* <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
/**
* Returns the method that was entered.
*
* @return an {@link ObjectReference} for the monitor.
*/
public ObjectReference monitor();
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
*
* Notification that a thread in the target VM is entering a monitor
* after waiting for it to be released by another thread.
* <P>
*
* @see EventQueue
* @see MonitorContendedEnterEvent
*
* @author Swamy Venkataramanappa
* @since 1.6
*/
@jdk.Exported
public interface MonitorContendedEnteredEvent extends LocatableEvent {
/**
* Returns the thread in which this event has occurred.
* <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
/**
* Returns the monitor that was entered.
*
* @return an {@link ObjectReference} for the monitor.
*/
public ObjectReference monitor();
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification that a thread in the target VM is about to
* wait on a monitor object.
* <P>
*
* @see EventQueue
* @see MonitorWaitedEvent
*
* @author Swamy Venkataramanappa
* @since 1.6
*/
@jdk.Exported
public interface MonitorWaitEvent extends LocatableEvent {
/**
* Returns the thread in which monitor wait event has occurred.
* <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
/**
* Returns the monitor object that the thread about to wait.
*
* @return an {@link ObjectReference} for the monitor.
*/
public ObjectReference monitor();
/**
* Returns the number of millisecond the thread will wait.
*
* @return a <code>jlong</code> containing monitor wait time in milliseconds.
*/
public long timeout();
}

View File

@@ -0,0 +1,68 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification that a thread in the target VM has finished
* waiting on an monitor object.
* <P>
*
* @see EventQueue
* @see MonitorWaitEvent
*
* @author Swamy Venkataramanappa
* @since 1.6
*/
@jdk.Exported
public interface MonitorWaitedEvent extends LocatableEvent {
/**
* Returns the thread in which this event has occurred.
* <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
/**
* Returns the monitor object this thread waited on.
*
* @return an {@link ObjectReference} for the monitor.
*/
public ObjectReference monitor();
/**
* Returns whether the wait has timed out or been interrupted.
*
* @return <code>true</code> if the wait is timed out.
*/
public boolean timedout();
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of step completion in the target VM.
* The step event
* is generated immediately before the code at its location is executed;
* thus, if the step is entering a new method (as might occur with
* {@link com.sun.jdi.request.StepRequest#STEP_INTO StepRequest.STEP_INTO})
* the location of the event is the first instruction of the method.
* When a step leaves a method, the location of the event will be the
* first instruction after the call in the calling method; note that
* this location may not be at a line boundary, even if
* {@link com.sun.jdi.request.StepRequest#STEP_LINE StepRequest.STEP_LINE}
* was used.
*
* @see com.sun.jdi.request.StepRequest
* @see EventQueue
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface StepEvent extends LocatableEvent {
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a completed thread in the target VM. The
* notification is generated by the dying thread before it terminates.
* Because of this timing, it is possible
* for {@link VirtualMachine#allThreads} to return this thread
* after this event is received.
* <p>
* Note that this event gives no information
* about the lifetime of the thread object. It may or may not be collected
* soon depending on what references exist in the target VM.
*
* @see EventQueue
* @see VirtualMachine
* @see ThreadReference
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface ThreadDeathEvent extends Event {
/**
* Returns the thread which is terminating.
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a new running thread in the target VM.
* The new thread can be the result of a call to
* <code>{@link java.lang.Thread#start}</code> or the result of
* attaching a new thread to the VM though JNI. The
* notification is generated by the new thread some time before
* its execution starts.
* Because of this timing, it is possible to receive other events
* for the thread before this event is received. (Notably,
* {@link MethodEntryEvent}s and {@link MethodExitEvent}s might occur
* during thread initialization.)
* It is also possible for {@link VirtualMachine#allThreads} to return
* a new started thread before this event is received.
* <p>
* Note that this event gives no information
* about the creation of the thread object which may have happened
* much earlier, depending on the VM being debugged.
*
* @see EventQueue
* @see VirtualMachine
* @see ThreadReference
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface ThreadStartEvent extends Event {
/**
* Returns the thread which has started.
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of target VM termination.
* This event occurs if the target VM terminates before the
* VM disconnects ({@link VMDisconnectEvent}).
* Thus, this event will NOT occur if
* external forces terminate the connection (e.g. a crash)
* or if the connection is intentionally terminated with
* {@link com.sun.jdi.VirtualMachine#dispose()
* VirtualMachine.dispose()}
* <P>
* On VM termination, a single unsolicited VMDeathEvent
* will always be sent with a
* {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy}
* of {@link com.sun.jdi.request.EventRequest#SUSPEND_NONE SUSPEND_NONE}.
* Additional VMDeathEvents will be sent in the same event set if they are
* requested with a
* {@link com.sun.jdi.request.VMDeathRequest VMDeathRequest}.
* <P>
* The VM is still intact and can be queried at the point this
* event was initiated but immediately thereafter it is not
* considered intact and cannot be queried.
* Note: If the enclosing {@link EventSet} has a
* {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy}
* other than
* {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL}
* the initiating point may be long past.
* <P>
* All VMDeathEvents will be in a single {@link EventSet},
* no other events will be in the event set. A resume
* must occur to continue execution after any event set which
* performs suspensions - in this case to allow proper shutdown.
*
* @see VMDisconnectEvent
* @see com.sun.jdi.request.EventRequestManager#createVMDeathRequest
* @see com.sun.jdi.request.VMDeathRequest
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface VMDeathEvent extends Event {
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of disconnection from target VM.
* May be caused by normal termination of a VM,
* VM termination by uncaught exception or other error,
* debugger action (
* {@link VirtualMachine#dispose} or
* {@link VirtualMachine#exit}) or by external events
* (for example, target process termination by the
* operating system, transport termination, etc).
* <p>
* If the target VM terminates before the disconnection, this event
* will be preceded by a {@link VMDeathEvent}.
* <p>
* This event is always sent.
* There is no corresponding {@link com.sun.jdi.request.EventRequest}.
* The enclosing singleton {@link EventSet} always has a
* suspend policy of {@link com.sun.jdi.request.EventRequest#SUSPEND_NONE}.
*
* @see VMDeathEvent
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface VMDisconnectEvent extends Event {
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of initialization of a target VM. This event is
* received before the main thread is started and before any
* application code has been executed. Before this event occurs
* a significant amount of system code has executed and a number
* of system classes have been loaded.
* This event is always generated by the target VM, even
* if not explicitly requested.
*
* @see VMDeathEvent
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface VMStartEvent extends Event {
/**
* Returns the initial thread of the VM which has started.
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
*/
public ThreadReference thread();
}

View File

@@ -0,0 +1,68 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jdi.event;
import com.sun.jdi.*;
/**
* Notification of a field triggered event encountered by a thread in the
* target VM.
*
* @see EventQueue
* @see VirtualMachine
*
* @author Robert Field
* @since 1.3
*/
@jdk.Exported
public interface WatchpointEvent extends LocatableEvent {
/**
* Returns the field that is about to be accessed/modified.
*
* @return a {@link Field} which mirrors the field
* in the target VM.
* @throws ObjectCollectedException may be thrown if class
* has been garbage collected.
*/
Field field();
/**
* Returns the object whose field is about to be accessed/modified.
* Return null is the access is to a static field.
*
* @return a {@link ObjectReference} which mirrors the event's
* object in the target VM.
*/
ObjectReference object();
/**
* Current value of the field.
* @throws ObjectCollectedException if object or class have been
* garbage collected.
*/
Value valueCurrent();
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This package defines JDI events and event processing.
* An {@link com.sun.jdi.event.Event} is always a member of an
* {@link com.sun.jdi.event.EventSet}, which
* is retrieved from the {@link com.sun.jdi.event.EventQueue}.
* Examples of Events include
* {@link com.sun.jdi.event.BreakpointEvent "breakpoints events"},
* {@link com.sun.jdi.event.ThreadStartEvent "thread creation events"} and
* {@link com.sun.jdi.event.VMDeathEvent "virtual machine death event"}.
* With the exception
* of termination events, all events received must be requested with an
* {@link com.sun.jdi.request.EventRequest "EventRequest"}. The
* {@link com.sun.jdi.request} package defines event requests and event
* request management.
* <p>
* Methods may be added to the interfaces in the JDI packages in future
* releases. Existing packages may be renamed if the JDI becomes a standard
* extension.
*/
@jdk.Exported
package com.sun.jdi.event;