KickJava   Java API By Example, From Geeks To Geeks.

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


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.debug.core.model;
12
13  
14 import org.eclipse.debug.core.DebugException;
15
16 /**
17  * A variable represents a visible data structure in a stack frame
18  * or value.
19  * Each variable has a value which may in turn contain more variables.
20  * A variable may support value modification.
21  * <p>
22  * An implementation may choose to re-use or discard
23  * variables on iterative thread suspensions. Clients
24  * cannot assume that variables are identical or equal across
25  * iterative thread suspensions and must check for equality on iterative
26  * suspensions if they wish to re-use the objects.
27  * </p>
28  * <p>
29  * An implementation that preserves equality
30  * across iterative suspensions may display more desirable behavior in
31  * some clients. For example, if variables are preserved
32  * while stepping, a UI client would be able to update the UI incrementally,
33  * rather than collapse and redraw the entire list or tree.
34  * </p>
35  * <p>
36  * Clients may implement this interface.
37  * </p>
38  * @see IValue
39  * @see IStackFrame
40  * @see IValueModification
41  */

42 public interface IVariable extends IDebugElement, IValueModification {
43     /**
44      * Returns the value of this variable.
45      *
46      * @return this variable's value
47      * @exception DebugException if this method fails. Reasons include:
48      * <ul><li>Failure communicating with the VM. The DebugException's
49      * status code contains the underlying exception responsible for
50      * the failure.</li>
51      */

52     public IValue getValue() throws DebugException;
53     /**
54      * Returns the name of this variable. Name format is debug model
55      * specific, and should be specified by a debug model.
56      *
57      * @return this variable's name
58      * @exception DebugException if this method fails. Reasons include:
59      * <ul><li>Failure communicating with the VM. The DebugException's
60      * status code contains the underlying exception responsible for
61      * the failure.</li>
62      */

63     public String JavaDoc getName() throws DebugException;
64     /**
65      * Returns a description of the type of data this variable is
66      * declared to reference. Note that the declared type of a
67      * variable and the concrete type of its value are not necessarily
68      * the same.
69      *
70      * @return the declared type of this variable
71      * @exception DebugException if this method fails. Reasons include:
72      * <ul><li>Failure communicating with the VM. The DebugException's
73      * status code contains the underlying exception responsible for
74      * the failure.</li>
75      */

76     public String JavaDoc getReferenceTypeName() throws DebugException;
77     
78     /**
79      * Returns whether this variable's value has changed since the last suspend event.
80      * Implementations may choose whether the last suspend event is the last suspend
81      * event in this variable's debug target, or within the thread(s) in which this variable
82      * is visible.
83      * <p>
84      * Implementations that choose not to implement this function should always
85      * return <code>false</code>.
86      * </p>
87      *
88      * @return whether this variable's value has changed since the last suspend event
89      * @exception DebugException if an exception occurs determining if this variable's
90      * value has changed since the last suspend event
91      */

92     public boolean hasValueChanged() throws DebugException;
93
94     
95 }
96
Popular Tags