KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > monitors > ThreadWrapper


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.debug.ui.monitors;
12
13
14 import java.util.ArrayList JavaDoc;
15 import java.util.List JavaDoc;
16
17 import org.eclipse.jdt.debug.core.IJavaThread;
18
19 /**
20  * ThreadWrapper used in by the monitor manager,
21  * wrapping the thread itself and its deadlock list
22  */

23 public class ThreadWrapper {
24     
25     /**
26      * The underlying Java thread
27      */

28     private IJavaThread fThread;
29     
30     /**
31      * The list holding the way to the deadlock
32      * as described in MonitorManager
33      */

34     private List JavaDoc fDeadLockList;
35
36     /**
37      * Constructor for the monitor thread wrapper
38      * @param thread The thread
39      * @param deadLockList The deadlock list as described in MonitorManager
40      */

41     public ThreadWrapper(IJavaThread thread, List JavaDoc deadLockList){
42         fThread = thread;
43         fDeadLockList = new ArrayList JavaDoc(deadLockList);
44     }
45
46     /**
47      * Returns the dead lock list.
48      * @return List
49      */

50     public List JavaDoc getDeadLockList() {
51         return fDeadLockList;
52     }
53
54     /**
55      * Returns the start thread.
56      * @return IJavaThread
57      */

58     public IJavaThread getStartThread() {
59         return fThread;
60     }
61 }
62
Popular Tags