KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > internal > request > ExceptionRequestImpl


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.jdi.internal.request;
12
13
14 import org.eclipse.jdi.internal.VirtualMachineImpl;
15 import org.eclipse.jdi.internal.event.ExceptionEventImpl;
16
17 import com.sun.jdi.ReferenceType;
18 import com.sun.jdi.request.ExceptionRequest;
19
20 /**
21  * This class implements the corresponding interfaces
22  * declared by the JDI specification. See the com.sun.jdi package
23  * for more information.
24  *
25  */

26 public class ExceptionRequestImpl extends EventRequestImpl implements ExceptionRequest {
27     /**
28      * Creates new EventRequestManager.
29      */

30     public ExceptionRequestImpl(VirtualMachineImpl vmImpl) {
31         super("ExceptionRequest", vmImpl); //$NON-NLS-1$
32
}
33
34     /**
35      * Returns exception type for which exception events are requested.
36      */

37     public ReferenceType exception() {
38         return ((EventRequestImpl.ExceptionFilter)fExceptionFilters.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.get(0)).fNotifyCaught;
46     }
47    
48     /**
49      * @return Returns true if uncaught exceptions will be reported.
50      */

51     public boolean notifyUncaught() {
52         return ((EventRequestImpl.ExceptionFilter)fExceptionFilters.get(0)).fNotifyUncaught;
53     }
54
55     /**
56      * @return Returns JDWP EventKind.
57      */

58     protected final byte eventKind() {
59         return ExceptionEventImpl.EVENT_KIND;
60     }
61 }
62
Popular Tags