01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdi.internal.request;
11:
12: import org.eclipse.jdi.internal.VirtualMachineImpl;
13: import org.eclipse.jdi.internal.event.ExceptionEventImpl;
14:
15: import com.sun.jdi.ReferenceType;
16: import com.sun.jdi.request.ExceptionRequest;
17:
18: /**
19: * This class implements the corresponding interfaces
20: * declared by the JDI specification. See the com.sun.jdi package
21: * for more information.
22: *
23: */
24: public class ExceptionRequestImpl extends EventRequestImpl implements
25: ExceptionRequest {
26: /**
27: * Creates new EventRequestManager.
28: */
29: public ExceptionRequestImpl(VirtualMachineImpl vmImpl) {
30: super ("ExceptionRequest", vmImpl); //$NON-NLS-1$
31: }
32:
33: /**
34: * Returns exception type for which exception events are requested.
35: */
36: public ReferenceType exception() {
37: return ((EventRequestImpl.ExceptionFilter) fExceptionFilters
38: .get(0)).fException;
39: }
40:
41: /**
42: * @return Returns true if caught exceptions will be reported.
43: */
44: public boolean notifyCaught() {
45: return ((EventRequestImpl.ExceptionFilter) fExceptionFilters
46: .get(0)).fNotifyCaught;
47: }
48:
49: /**
50: * @return Returns true if uncaught exceptions will be reported.
51: */
52: public boolean notifyUncaught() {
53: return ((EventRequestImpl.ExceptionFilter) fExceptionFilters
54: .get(0)).fNotifyUncaught;
55: }
56:
57: /**
58: * @return Returns JDWP EventKind.
59: */
60: protected final byte eventKind() {
61: return ExceptionEventImpl.EVENT_KIND;
62: }
63: }
|