KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > internal > MonitorInfoImpl


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.jdi.internal;
12
13 import com.sun.jdi.InvalidStackFrameException;
14 import com.sun.jdi.MonitorInfo;
15 import com.sun.jdi.ObjectReference;
16 import com.sun.jdi.ThreadReference;
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  * @since 3.3
23  */

24 public class MonitorInfoImpl extends MirrorImpl implements MonitorInfo {
25
26     private ThreadReference fThread;
27     private ObjectReference fMonitor;
28     private int fDepth;
29     
30     /** constructor **/
31     public MonitorInfoImpl(ThreadReference thread, int depth, ObjectReference monitor, VirtualMachineImpl virtualMachineImpl) {
32         super("MonitorInfoImpl", virtualMachineImpl); //$NON-NLS-1$
33
fThread = thread;
34         fDepth = depth;
35         fMonitor = monitor;
36     }
37     
38     /**
39      * @see com.sun.jdi.MonitorInfo#monitor()
40      */

41     public ObjectReference monitor() throws InvalidStackFrameException {
42         return fMonitor;
43     }
44
45     /**
46      * @see com.sun.jdi.MonitorInfo#stackDepth()
47      */

48     public int stackDepth() throws InvalidStackFrameException {
49         return fDepth;
50     }
51
52     /**
53      * @see com.sun.jdi.MonitorInfo#thread()
54      */

55     public ThreadReference thread() throws InvalidStackFrameException {
56         return fThread;
57     }
58 }
59
Popular Tags