History

My first initial commit with all of mine experimental changes.

Dmitry Kabak (userdima committed 13 years ago

Commit d37b88d1 parent 3f5b46618352 files · +2598093 −-8690Browse files

Showing the changes to java/pkg/com/sun/jdi/request/ExceptionRequest.java (1 of 18352 files). Show all

Unified · Split

java/pkg/com/sun/jdi/request/ExceptionRequest.java+155−0
@@ -0,0 +1,155 @@
1+/*
2+ * Copyright (c) 1998, 2001, 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+package com.sun.jdi.request;
27+
28+import com.sun.jdi.*;
29+
30+/**
31+ * Request for notification when an exception occurs in the target VM.
32+ * When an enabled ExceptionRequest is satisfied, an
33+ * {@link com.sun.jdi.event.EventSet event set} containing an
34+ * {@link com.sun.jdi.event.ExceptionEvent ExceptionEvent} will be placed
35+ * on the {@link com.sun.jdi.event.EventQueue EventQueue}.
36+ * The collection of existing ExceptionRequests is
37+ * managed by the {@link EventRequestManager}
38+ *
39+ * @see com.sun.jdi.event.ExceptionEvent
40+ * @see com.sun.jdi.event.EventQueue
41+ * @see EventRequestManager
42+ *
43+ * @author Robert Field
44+ * @since 1.3
45+ */
46+public interface ExceptionRequest extends EventRequest {
47+
48+ /**
49+ * Returns exception type for which exception events are requested.
50+ * @return
51+ * The exception (and its subclasses) requested
52+ * with {@link EventRequestManager#createExceptionRequest}, or
53+ * null if, as by default, all exceptions are requested.
54+ */
55+ ReferenceType exception();
56+
57+ /**
58+ * Returns whether caught exceptions of the requested type
59+ * will generate events when they are thrown.
60+ * <p>
61+ * Note that at the time an exception is thrown, it is not always
62+ * possible to determine whether it is truly caught. See
63+ * {@link com.sun.jdi.event.ExceptionEvent#catchLocation} for
64+ * details.
65+ * @return
66+ * boolean true if caught exceptions will be reported, false
67+ * otherwise.
68+ */
69+ boolean notifyCaught();
70+
71+ /**
72+ * Returns whether uncaught exceptions of the requested type
73+ * will generate events when they are thrown.
74+ * <p>
75+ * Note that at the time an exception is thrown, it is not always
76+ * possible to determine whether it is truly uncaught. See
77+ * {@link com.sun.jdi.event.ExceptionEvent#catchLocation} for
78+ * details.
79+ * @return
80+ * boolean true if caught exceptions will be reported, false
81+ * otherwise.
82+ */
83+ boolean notifyUncaught();
84+
85+ /**
86+ * Restricts the events generated by this request to those in
87+ * the given thread.
88+ * @param thread the thread to filter on.
89+ * @throws InvalidRequestStateException if this request is currently
90+ * enabled or has been deleted.
91+ * Filters may be added only to disabled requests.
92+ */
93+ void addThreadFilter(ThreadReference thread);
94+
95+ /**
96+ * Restricts the events generated by this request to those whose
97+ * location is in the given reference type or any of its subtypes.
98+ * An event will be generated for any location in a reference type
99+ * that can be safely cast to the given reference type.
100+ *
101+ * @param refType the reference type to filter on.
102+ * @throws InvalidRequestStateException if this request is currently
103+ * enabled or has been deleted.
104+ * Filters may be added only to disabled requests.
105+ */
106+ void addClassFilter(ReferenceType refType);
107+
108+ /**
109+ * Restricts the events generated by this request to those
110+ * whose location is in a class whose name matches a restricted
111+ * regular expression. Regular expressions are limited
112+ * to exact matches and patterns that begin with '*' or end with '*';
113+ * for example, "*.Foo" or "java.*".
114+ *
115+ * @param classPattern the pattern String to filter for.
116+ * @throws InvalidRequestStateException if this request is currently
117+ * enabled or has been deleted.
118+ * Filters may be added only to disabled requests.
119+ */
120+ void addClassFilter(String classPattern);
121+
122+ /**
123+ * Restricts the events generated by this request to those
124+ * whose location is in a class whose name does <b>not</b> match a
125+ * restricted regular expression. Regular expressions are limited
126+ * to exact matches and patterns that begin with '*' or end with '*';
127+ * for example, "*.Foo" or "java.*".
128+ *
129+ * @param classPattern the pattern String to filter against.
130+ * @throws InvalidRequestStateException if this request is currently
131+ * enabled or has been deleted.
132+ * Filters may be added only to disabled requests.
133+ */
134+ void addClassExclusionFilter(String classPattern);
135+
136+ /**
137+ * Restricts the events generated by this request to those in
138+ * which the currently executing instance ("this") is the object
139+ * specified.
140+ * <P>
141+ * Not all targets support this operation.
142+ * Use {@link VirtualMachine#canUseInstanceFilters()}
143+ * to determine if the operation is supported.
144+ * @since 1.4
145+ * @param instance the object which must be the current instance
146+ * in order to pass this filter.
147+ * @throws java.lang.UnsupportedOperationException if
148+ * the target virtual machine does not support this
149+ * operation.
150+ * @throws InvalidRequestStateException if this request is currently
151+ * enabled or has been deleted.
152+ * Filters may be added only to disabled requests.
153+ */
154+ void addInstanceFilter(ObjectReference instance);
155+}