001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.debug.core;
011:
012: import org.eclipse.core.runtime.CoreException;
013:
014: /**
015: * A breakpoint that suspends execution when a corresponding exception
016: * is thrown in a target VM. An exception breakpoint can be configured
017: * to suspend execution when the corresponding exception is thrown in
018: * a caught or uncaught location. As well, the location can be filtered
019: * inclusively or exclusively by type name patterns.
020: * <p>
021: * Clients are not intended to implement this interface.
022: * </p>
023: * @since 2.0
024: */
025: public interface IJavaExceptionBreakpoint extends IJavaBreakpoint {
026: /**
027: * Sets the inclusion filters that will define the scope for the associated exception.
028: * Filters are a collection of strings of type name prefixes.
029: * Default packages should be specified as the empty string.
030: *
031: * @param filters the array of filters to apply
032: * @exception CoreException if unable to set the property on
033: * this breakpoint's underlying marker
034: * @since 2.1
035: */
036: public void setInclusionFilters(String[] filters)
037: throws CoreException;
038:
039: /**
040: * Returns the inclusive filters that define the scope for the associated exception.
041: * Filters are a collection of strings of type name prefixes.
042: *
043: * @return the array of defined inclusive filters
044: * @exception CoreException if unable to access the property on
045: * this breakpoint's underlying marker
046: * @since 2.1
047: */
048: public String[] getInclusionFilters() throws CoreException;
049:
050: /**
051: * Returns whether this breakpoint suspends execution when the
052: * associated exception is thrown in a caught location (in
053: * a try/catch statement).
054: *
055: * @return <code>true</code> if this is a caught exception
056: * breakpoint
057: * @exception CoreException if unable to access the property from
058: * this breakpoint's underlying marker
059: */
060: public boolean isCaught() throws CoreException;
061:
062: /**
063: * Returns whether this breakpoint suspends execution when the
064: * associated exception is thrown in an uncaught location (not
065: * caught by a try/catch statement).
066: *
067: * @return <code>true</code> if this is an uncaught exception
068: * breakpoint.
069: * @exception CoreException if unable to access the property from
070: * this breakpoint's underlying marker
071: */
072: public boolean isUncaught() throws CoreException;
073:
074: /**
075: * Sets whether this breakpoint suspends execution when the associated
076: * exception is thrown in a caught location (in a try/catch
077: * statement).
078: *
079: * @param caught whether or not this breakpoint suspends execution when the
080: * associated exception is thrown in a caught location
081: * @exception CoreException if unable to set the property on
082: * this breakpoint's underlying marker
083: */
084: public void setCaught(boolean caught) throws CoreException;
085:
086: /**
087: * Sets whether this breakpoint suspends execution when the associated
088: * exception is thrown in an uncaught location.
089: *
090: * @param uncaught whether or not this breakpoint suspends execution when the
091: * associated exception is thrown in an uncaught location
092: * @exception CoreException if unable to set the property
093: * on this breakpoint's underlying marker
094: */
095: public void setUncaught(boolean uncaught) throws CoreException;
096:
097: /**
098: * Returns whether the exception associated with this breakpoint is a
099: * checked exception (compiler detected).
100: *
101: * @return <code>true</code> if the exception associated with this breakpoint
102: * is a checked exception
103: * @exception CoreException if unable to access the property from
104: * this breakpoint's underlying marker
105: */
106: public boolean isChecked() throws CoreException;
107:
108: /**
109: * Returns the fully qualified type name of the exception that
110: * last caused this breakpoint to suspend, of <code>null</code>
111: * if this breakpoint has not caused a thread to suspend. Note
112: * that this name may be a sub type of the exception that this
113: * breakpoint is associated with.
114: *
115: * @return fully qualified exception name or <code>null</code>
116: */
117: public String getExceptionTypeName();
118:
119: /**
120: * Sets the filters that will define the scope for the associated exception.
121: * Filters are a collection of strings of type name prefixes.
122: * Default packages should be specified as the empty string.
123: *
124: * @param filters the array of filters to apply
125: * @param inclusive whether or not to apply the filters as inclusive or exclusive
126: * @exception CoreException if unable to set the property on
127: * this breakpoint's underlying marker
128: * @deprecated Exception breakpoints can have a mixed set of filters. Use setInclusiveFilters(String[] filters) or setExclusiveFilters(String[] filters)
129: */
130: public void setFilters(String[] filters, boolean inclusive)
131: throws CoreException;
132:
133: /**
134: * Sets the exclusion filters that will define the scope for the associated exception.
135: * Filters are a collection of strings of type name prefixes.
136: * Default packages should be specified as the empty string.
137: *
138: * @param filters the array of filters to apply
139: * @exception CoreException if unable to set the property on
140: * this breakpoint's underlying marker
141: * @since 2.1
142: */
143: public void setExclusionFilters(String[] filters)
144: throws CoreException;
145:
146: /**
147: * Returns the filters that define the scope for the associated exception.
148: * Filters are a collection of strings of type name prefixes.
149: *
150: * @return the array of defined filters
151: * @exception CoreException if unable to access the property on
152: * this breakpoint's underlying marker
153: * @deprecated Use getExclusionFilters() or getInclusionFilters()
154: */
155: public String[] getFilters() throws CoreException;
156:
157: /**
158: * Returns the exclusive filters that define the scope for the associated exception.
159: * Filters are a collection of strings of type name prefixes.
160: *
161: * @return the array of defined inclusive filters
162: * @exception CoreException if unable to access the property on
163: * this breakpoint's underlying marker
164: * @since 2.1
165: */
166: public String[] getExclusionFilters() throws CoreException;
167:
168: /**
169: * Returns whether any inclusive filters have been applied.
170: * @return <code>true</code> if the inclusive filters have been applied
171: * @exception CoreException if unable to access the property on
172: * this breakpoint's underlying marker
173: * @deprecated Exception breakpoints can have a mixed set of filters
174: * and this method is maintained strictly for API backwards compatibility
175: */
176: public boolean isInclusiveFiltered() throws CoreException;
177: }
|