KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > debug > core > IJavaExceptionBreakpoint


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.debug.core;
12
13  
14 import org.eclipse.core.runtime.CoreException;
15
16 /**
17  * A breakpoint that suspends execution when a corresponding exception
18  * is thrown in a target VM. An exception breakpoint can be configured
19  * to suspend execution when the corresponding exception is thrown in
20  * a caught or uncaught location. As well, the location can be filtered
21  * inclusively or exclusively by type name patterns.
22  * <p>
23  * Clients are not intended to implement this interface.
24  * </p>
25  * @since 2.0
26  */

27 public interface IJavaExceptionBreakpoint extends IJavaBreakpoint {
28     /**
29      * Sets the inclusion filters that will define the scope for the associated exception.
30      * Filters are a collection of strings of type name prefixes.
31      * Default packages should be specified as the empty string.
32      *
33      * @param filters the array of filters to apply
34      * @exception CoreException if unable to set the property on
35      * this breakpoint's underlying marker
36      * @since 2.1
37      */

38     public void setInclusionFilters(String JavaDoc[] filters) throws CoreException;
39
40     /**
41      * Returns the inclusive filters that define the scope for the associated exception.
42      * Filters are a collection of strings of type name prefixes.
43      *
44      * @return the array of defined inclusive filters
45      * @exception CoreException if unable to access the property on
46      * this breakpoint's underlying marker
47      * @since 2.1
48      */

49     public String JavaDoc[] getInclusionFilters() throws CoreException;
50
51     /**
52      * Returns whether this breakpoint suspends execution when the
53      * associated exception is thrown in a caught location (in
54      * a try/catch statement).
55      *
56      * @return <code>true</code> if this is a caught exception
57      * breakpoint
58      * @exception CoreException if unable to access the property from
59      * this breakpoint's underlying marker
60      */

61     public boolean isCaught() throws CoreException;
62     /**
63      * Returns whether this breakpoint suspends execution when the
64      * associated exception is thrown in an uncaught location (not
65      * caught by a try/catch statement).
66      *
67      * @return <code>true</code> if this is an uncaught exception
68      * breakpoint.
69      * @exception CoreException if unable to access the property from
70      * this breakpoint's underlying marker
71      */

72     public boolean isUncaught() throws CoreException;
73     /**
74      * Sets whether this breakpoint suspends execution when the associated
75      * exception is thrown in a caught location (in a try/catch
76      * statement).
77      *
78      * @param caught whether or not this breakpoint suspends execution when the
79      * associated exception is thrown in a caught location
80      * @exception CoreException if unable to set the property on
81      * this breakpoint's underlying marker
82      */

83     public void setCaught(boolean caught) throws CoreException;
84     /**
85      * Sets whether this breakpoint suspends execution when the associated
86      * exception is thrown in an uncaught location.
87      *
88      * @param uncaught whether or not this breakpoint suspends execution when the
89      * associated exception is thrown in an uncaught location
90      * @exception CoreException if unable to set the property
91      * on this breakpoint's underlying marker
92      */

93     public void setUncaught(boolean uncaught) throws CoreException;
94     /**
95      * Returns whether the exception associated with this breakpoint is a
96      * checked exception (compiler detected).
97      *
98      * @return <code>true</code> if the exception associated with this breakpoint
99      * is a checked exception
100      * @exception CoreException if unable to access the property from
101      * this breakpoint's underlying marker
102      */

103     public boolean isChecked() throws CoreException;
104     
105     /**
106      * Returns the fully qualified type name of the exception that
107      * last caused this breakpoint to suspend, of <code>null</code>
108      * if this breakpoint has not caused a thread to suspend. Note
109      * that this name may be a sub type of the exception that this
110      * breakpoint is associated with.
111      *
112      * @return fully qualified exception name or <code>null</code>
113      */

114     public String JavaDoc getExceptionTypeName();
115     
116     /**
117      * Sets the filters that will define the scope for the associated exception.
118      * Filters are a collection of strings of type name prefixes.
119      * Default packages should be specified as the empty string.
120      *
121      * @param filters the array of filters to apply
122      * @param inclusive whether or not to apply the filters as inclusive or exclusive
123      * @exception CoreException if unable to set the property on
124      * this breakpoint's underlying marker
125      * @deprecated Exception breakpoints can have a mixed set of filters. Use setInclusiveFilters(String[] filters) or setExclusiveFilters(String[] filters)
126      */

127     public void setFilters(String JavaDoc[] filters, boolean inclusive) throws CoreException;
128     
129     /**
130      * Sets the exclusion filters that will define the scope for the associated exception.
131      * Filters are a collection of strings of type name prefixes.
132      * Default packages should be specified as the empty string.
133      *
134      * @param filters the array of filters to apply
135      * @exception CoreException if unable to set the property on
136      * this breakpoint's underlying marker
137      * @since 2.1
138      */

139     public void setExclusionFilters(String JavaDoc[] filters) throws CoreException;
140     
141     /**
142      * Returns the filters that define the scope for the associated exception.
143      * Filters are a collection of strings of type name prefixes.
144      *
145      * @return the array of defined filters
146      * @exception CoreException if unable to access the property on
147      * this breakpoint's underlying marker
148      * @deprecated Use getExclusionFilters() or getInclusionFilters()
149      */

150     public String JavaDoc[] getFilters() throws CoreException;
151     
152     /**
153      * Returns the exclusive filters that define the scope for the associated exception.
154      * Filters are a collection of strings of type name prefixes.
155      *
156      * @return the array of defined inclusive filters
157      * @exception CoreException if unable to access the property on
158      * this breakpoint's underlying marker
159      * @since 2.1
160      */

161     public String JavaDoc[] getExclusionFilters() throws CoreException;
162     
163     /**
164      * Returns whether any inclusive filters have been applied.
165      * @return <code>true</code> if the inclusive filters have been applied
166      * @exception CoreException if unable to access the property on
167      * this breakpoint's underlying marker
168      * @deprecated Exception breakpoints can have a mixed set of filters
169      * and this method is maintained strictly for API backwards compatibility
170      */

171     public boolean isInclusiveFiltered() throws CoreException;
172 }
173
174
Popular Tags