KickJava   Java API By Example, From Geeks To Geeks.

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


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 import com.sun.jdi.AbsentInformationException;
23 import java.beans.PropertyChangeListener JavaDoc;
24 import java.util.List JavaDoc;
25 import org.netbeans.spi.debugger.jpda.EditorContext.Operation;
26
27
28 /**
29  * Represents one stack frame.
30  *
31  * <pre style="background-color: rgb(255, 255, 102);">
32  * Since JDI interfaces evolve from one version to another, it's strongly recommended
33  * not to implement this interface in client code. New methods can be added to
34  * this interface at any time to keep up with the JDI functionality.</pre>
35  *
36  * @author Jan Jancura
37  */

38 public interface CallStackFrame {
39     
40     /**
41      * Returns line number associated with this stack frame.
42      *
43      * @param struts a language name or null for default language
44      * @return line number associated with this this stack frame
45      */

46     public abstract int getLineNumber (String JavaDoc struts);
47
48     /**
49      * Returns the current operation (if any) at the location of this call stack frame.
50      *
51      * @param struts a language name or null for default language
52      * @return The operation at the frame location if available and this frame does not
53      * represent a native method invocation; <CODE>null</CODE> otherwise
54      */

55     public abstract Operation getCurrentOperation(String JavaDoc struts);
56
57     /**
58      * Returns method name associated with this stack frame.
59      *
60      * @return method name associated with this stack frame
61      */

62     public abstract String JavaDoc getMethodName ();
63
64     /**
65      * Returns class name of this stack frame.
66      *
67      * @return class name of this stack frame
68      */

69     public abstract String JavaDoc getClassName ();
70
71     /**
72     * Returns name of default stratumn.
73     *
74     * @return name of default stratumn
75     */

76     public abstract String JavaDoc getDefaultStratum ();
77
78     /**
79     * Returns name of default stratumn.
80     *
81     * @return name of default stratumn
82     */

83     public abstract List JavaDoc<String JavaDoc> getAvailableStrata ();
84
85     /**
86      * Returns name of file this stack frame is stopped in.
87      *
88      * @param struts a language name or null for default language
89      * @return name of file this stack frame is stopped in
90      * @throws NoInformationException if information about source is not
91      * included in class file
92      */

93     public abstract String JavaDoc getSourceName (String JavaDoc struts)
94     throws AbsentInformationException;
95     
96     /**
97      * Returns source path of file this frame is stopped in or null.
98      *
99      * @return source path of file this frame is stopped in or null
100      */

101     public abstract String JavaDoc getSourcePath (String JavaDoc stratum)
102     throws AbsentInformationException;
103     
104     /**
105      * Returns local variables.
106      *
107      * @return local variables
108      */

109     public abstract LocalVariable[] getLocalVariables ()
110     throws AbsentInformationException;
111
112     /**
113      * Returns object reference this frame is associated with or null (
114      * frame is in static method).
115      *
116      * @return object reference this frame is associated with or null
117      */

118     public abstract This getThisVariable ();
119     
120     /**
121      * Sets this frame current.
122      *
123      * @see JPDADebugger#getCurrentCallStackFrame
124      */

125     public abstract void makeCurrent ();
126     
127     /**
128      * Returns <code>true</code> if this frame is obsoleted.
129      *
130      * @return <code>true</code> if this frame is obsoleted
131      */

132     public abstract boolean isObsolete ();
133     
134     /** UNCOMMENT WHEN THIS METHOD IS NEEDED. IT'S ALREADY IMPLEMENTED IN THE IMPL. CLASS.
135      * Determine, if this stack frame can be poped off the stack.
136      *
137      * @return <code>true</code> if this frame can be poped
138      *
139     public abstract boolean canPop();
140      */

141     
142     /**
143      * Pop stack frames. All frames up to and including the frame
144      * are popped off the stack. The frame previous to the parameter
145      * frame will become the current frame.
146      */

147     public abstract void popFrame ();
148     
149     /**
150      * Returns thread.
151      *
152      * @return thread
153      */

154     public abstract JPDAThread getThread ();
155 }
156  
Popular Tags