KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > model > IDebugTarget


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.debug.core.model;
12
13
14 import org.eclipse.debug.core.DebugException;
15 import org.eclipse.debug.core.IBreakpointListener;
16
17 /**
18  * A debug target is a debuggable execution context. For example, a debug target
19  * may represent a debuggable process or a virtual machine. A debug target is the root
20  * of the debug element hierarchy. A debug target contains threads. Minimally, a debug
21  * target supports the following:
22  * <ul>
23  * <li>terminate
24  * <li>suspend/resume
25  * <li>breakpoints
26  * <li>disconnect
27  * </ul>
28  * <p>
29  * Generally, launching a debug session results in the creation of a
30  * debug target. Launching is a client responsibility, as is debug target
31  * creation.
32  * <p>
33  * Clients may implement this interface.
34  * </p>
35  * @see ITerminate
36  * @see ISuspendResume
37  * @see IBreakpointListener
38  * @see IDisconnect
39  * @see IMemoryBlockRetrieval
40  * @see org.eclipse.debug.core.ILaunch
41  */

42 public interface IDebugTarget extends IDebugElement, ITerminate, ISuspendResume, IBreakpointListener, IDisconnect, IMemoryBlockRetrieval {
43     /**
44      * Returns the system process associated with this debug target.
45      *
46      * @return the system process associated with this debug target
47      */

48     public IProcess getProcess();
49     /**
50      * Returns the threads contained in this debug target. An
51      * empty collection is returned if this debug target contains
52      * no threads.
53      *
54      * @return a collection of threads
55      * @exception DebugException if this method fails. Reasons include:
56      * <ul><li>Failure communicating with the debug target. The DebugException's
57      * status code contains the underlying exception responsible for
58      * the failure.</li></ul>
59      * @since 2.0
60      */

61     public IThread[] getThreads() throws DebugException;
62     
63     /**
64      * Returns whether this debug target currently contains any threads.
65      *
66      * @return whether this debug target currently contains any threads
67      * @exception DebugException if this method fails. Reasons include:
68      * <ul><li>Failure communicating with the debug target. The DebugException's
69      * status code contains the underlying exception responsible for
70      * the failure.</li></ul>
71      * @since 2.0
72      */

73     public boolean hasThreads() throws DebugException;
74     
75     /**
76      * Returns the name of this debug target. Name format is debug model
77      * specific, and should be specified by a debug model.
78      *
79      * @return this target's name
80      * @exception DebugException if this method fails. Reasons include:
81      * <ul><li>Failure communicating with the debug target. The DebugException's
82      * status code contains the underlying exception responsible for
83      * the failure.</li></ul>
84      */

85     public String JavaDoc getName() throws DebugException;
86     
87     /**
88      * Returns whether this target can install the given breakpoint.
89      *
90      * @param breakpoint breakpoing to consider
91      * @return whether this target can install the given breakpoint
92      */

93     public boolean supportsBreakpoint(IBreakpoint breakpoint);
94 }
95
96
97
Popular Tags