01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 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;
11:
12: import com.sun.jdi.InvalidStackFrameException;
13: import com.sun.jdi.MonitorInfo;
14: import com.sun.jdi.ObjectReference;
15: import com.sun.jdi.ThreadReference;
16:
17: /**
18: * this class implements the corresponding interfaces
19: * declared by the JDI specification. See the com.sun.jdi package
20: * for more information.
21: * @since 3.3
22: */
23: public class MonitorInfoImpl extends MirrorImpl implements MonitorInfo {
24:
25: private ThreadReference fThread;
26: private ObjectReference fMonitor;
27: private int fDepth;
28:
29: /** constructor **/
30: public MonitorInfoImpl(ThreadReference thread, int depth,
31: ObjectReference monitor,
32: VirtualMachineImpl virtualMachineImpl) {
33: super ("MonitorInfoImpl", virtualMachineImpl); //$NON-NLS-1$
34: fThread = thread;
35: fDepth = depth;
36: fMonitor = monitor;
37: }
38:
39: /**
40: * @see com.sun.jdi.MonitorInfo#monitor()
41: */
42: public ObjectReference monitor() throws InvalidStackFrameException {
43: return fMonitor;
44: }
45:
46: /**
47: * @see com.sun.jdi.MonitorInfo#stackDepth()
48: */
49: public int stackDepth() throws InvalidStackFrameException {
50: return fDepth;
51: }
52:
53: /**
54: * @see com.sun.jdi.MonitorInfo#thread()
55: */
56: public ThreadReference thread() throws InvalidStackFrameException {
57: return fThread;
58: }
59: }
|