< prev index next >

src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java

Print this page

  1 /*
  2  * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.  Oracle designates this
  8  * particular file as subject to the "Classpath" exception as provided
  9  * by Oracle in the LICENSE file that accompanied this code.
 10  *
 11  * This code is distributed in the hope that it will be useful, but WITHOUT
 12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14  * version 2 for more details (a copy is included in the LICENSE file that
 15  * accompanied this code).
 16  *
 17  * You should have received a copy of the GNU General Public License version
 18  * 2 along with this work; if not, write to the Free Software Foundation,
 19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20  *
 21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22  * or visit www.oracle.com if you need additional information or have any

 79      * @throws InvalidStackFrameException if this stack frame has become
 80      * invalid. Once the frame's thread is resumed, the stack frame is
 81      * no longer valid.
 82      */
 83     Location location();
 84 
 85     /**
 86      * Returns the thread under which this frame's method is running.
 87      *
 88      * @return a {@link ThreadReference} which mirrors the frame's thread.
 89      * @throws InvalidStackFrameException if this stack frame has become
 90      * invalid. Once the frame's thread is resumed, the stack frame is
 91      * no longer valid.
 92      */
 93     ThreadReference thread();
 94 
 95     /**
 96      * Returns the value of 'this' for the current frame.
 97      * The {@link ObjectReference} for 'this' is only available for
 98      * non-native instance methods.








 99      *
100      * @return an {@link ObjectReference}, or null if the frame represents
101      * a native or static method.
102      * @throws InvalidStackFrameException if this stack frame has become
103      * invalid. Once the frame's thread is resumed, the stack frame is
104      * no longer valid.
105      */
106     ObjectReference thisObject();
107 
108     /**
109      * Returns a list containing each {@link LocalVariable}
110      * that can be accessed from this frame's location.
111      * <p>
112      * Visibility is based on the code index of the current instruction of
113      * this StackFrame. Each variable has a range of byte code indices in which
114      * it is accessible.
115      * If this stack frame's method
116      * matches this variable's method and if the code index of this
117      * StackFrame is within the variable's byte code range, the variable is
118      * visible.

  1 /*
  2  * Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.  Oracle designates this
  8  * particular file as subject to the "Classpath" exception as provided
  9  * by Oracle in the LICENSE file that accompanied this code.
 10  *
 11  * This code is distributed in the hope that it will be useful, but WITHOUT
 12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14  * version 2 for more details (a copy is included in the LICENSE file that
 15  * accompanied this code).
 16  *
 17  * You should have received a copy of the GNU General Public License version
 18  * 2 along with this work; if not, write to the Free Software Foundation,
 19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20  *
 21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22  * or visit www.oracle.com if you need additional information or have any

 79      * @throws InvalidStackFrameException if this stack frame has become
 80      * invalid. Once the frame's thread is resumed, the stack frame is
 81      * no longer valid.
 82      */
 83     Location location();
 84 
 85     /**
 86      * Returns the thread under which this frame's method is running.
 87      *
 88      * @return a {@link ThreadReference} which mirrors the frame's thread.
 89      * @throws InvalidStackFrameException if this stack frame has become
 90      * invalid. Once the frame's thread is resumed, the stack frame is
 91      * no longer valid.
 92      */
 93     ThreadReference thread();
 94 
 95     /**
 96      * Returns the value of 'this' for the current frame.
 97      * The {@link ObjectReference} for 'this' is only available for
 98      * non-native instance methods.
 99      * <p>
100      * If 'this' is a {@linkplain
101      * ObjectReference##valueObjects value object<sup class="preview-mark">PREVIEW</sup>}
102      * under construction, the returned {@code ObjectReference} will refer to a
103      * <em>snapshot</em> of the value object, not a reference
104      * to the actual value object under construction. Consequently, the returned
105      * {@code ObjectReference} will not reflect changes to the value object that
106      * happen later during construction.
107      *
108      * @return an {@link ObjectReference}, or null if the frame represents
109      * a native or static method.
110      * @throws InvalidStackFrameException if this stack frame has become
111      * invalid. Once the frame's thread is resumed, the stack frame is
112      * no longer valid.
113      */
114     ObjectReference thisObject();
115 
116     /**
117      * Returns a list containing each {@link LocalVariable}
118      * that can be accessed from this frame's location.
119      * <p>
120      * Visibility is based on the code index of the current instruction of
121      * this StackFrame. Each variable has a range of byte code indices in which
122      * it is accessible.
123      * If this stack frame's method
124      * matches this variable's method and if the code index of this
125      * StackFrame is within the variable's byte code range, the variable is
126      * visible.
< prev index next >