KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > debugger > jpda > JPDAWatch


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.api.debugger.jpda;
21
22
23
24 /**
25  * Represents watch in JPDA debugger.
26  *
27  * <pre style="background-color: rgb(255, 255, 102);">
28  * It's strongly recommended
29  * not to implement this interface in client code. New methods can be added to
30  * this interface at any time to keep up with the JDI functionality.</pre>
31  *
32  * @author Jan Jancura
33  */

34
35 public interface JPDAWatch extends Variable {
36
37     /**
38      * Watched expression.
39      *
40      * @return watched expression
41      */

42     public abstract String JavaDoc getExpression ();
43
44     /**
45      * Sets watched expression.
46      *
47      * @param expression a expression to be watched
48      */

49     public abstract void setExpression (String JavaDoc expression);
50     
51     /**
52      * Remove the watch from the list of all watches in the system.
53      */

54     public abstract void remove ();
55
56     /**
57      * Declared type of this local.
58      *
59      * @return declared type of this local
60      */

61     public abstract String JavaDoc getType ();
62
63     /**
64      * Text representation of current value of this local.
65      *
66      * @return text representation of current value of this local
67      */

68     public abstract String JavaDoc getValue ();
69
70     /**
71      * Returns description of problem is this watch can not be evaluated
72      * in current context.
73      *
74      * @return description of problem
75      */

76     public abstract String JavaDoc getExceptionDescription ();
77     
78     /**
79      * Sets value of this local represented as text.
80      *
81      * @param value a new value of this variable represented as text
82      */

83     public abstract void setValue (String JavaDoc value) throws InvalidExpressionException;
84
85     /**
86      * Calls {@link java.lang.Object#toString} in debugged JVM and returns
87      * its value.
88      *
89      * @return toString () value of this instance
90      */

91     public abstract String JavaDoc getToStringValue () throws InvalidExpressionException;
92 }
93
94
Popular Tags