Package org.eclipse.jdt.debug.core
Interface IJavaStackFrame
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
,org.eclipse.debug.core.model.IDebugElement
,org.eclipse.debug.core.model.IDropToFrame
,org.eclipse.debug.core.model.IFilteredStep
,IJavaModifiers
,org.eclipse.debug.core.model.IStackFrame
,org.eclipse.debug.core.model.IStep
,org.eclipse.debug.core.model.ISuspendResume
,org.eclipse.debug.core.model.ITerminate
public interface IJavaStackFrame
extends org.eclipse.debug.core.model.IStackFrame, IJavaModifiers, org.eclipse.debug.core.model.IFilteredStep, org.eclipse.debug.core.model.IDropToFrame
A stack frame in a thread on a Java virtual machine.
Since 3.1, IJavaStackFrame
also implements
IDropToFrame
.
- See Also:
-
IStackFrame
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Status code indicating a stack frame is invalid. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this frame currently supports a force return operation.findVariable
(String variableName) Returns the local, static, or "this" variable with the given name, ornull
if unable to resolve a variable with the name.void
forceReturn
(IJavaValue value) Steps out of this frame's method returning the given value.Returns a list of fully qualified type names of the arguments for the method associated with this stack frame.Deprecated.Returns the fully qualified name of the type that declares the method associated with this stack frame.int
getLineNumber
(String stratum) Returns the line number of the instruction pointer in this stack frame that corresponds to the line in the associated source element in the specified stratum, or-1
if line number information is unavailable.Returns a collection of local variables that are visible at the current point of execution in this stack frame.Returns the name of the method associated with this stack frameReturns the fully qualified name of the type that is the receiving object associated with this stack frameReturns the type in which this stack frame's method is declared.Returns the JNI signature for the method this stack frame is associated with.Returns the source name debug attribute associated with the declaring type of this stack frame, ornull
if the source name debug attribute not present.getSourceName
(String stratum) Returns the source name debug attribute associated with the declaring type of this stack frame in the specified stratum, ornull
if the source name debug attribute not present.Returns the source path debug attribute associated with this stack frame, ornull
if the source path is not known.getSourcePath
(String stratum) Returns the source path debug attribute associated with this stack frame in the specified stratum, ornull
if the source path is not known.getThis()
Returns a reference to the receiver of the method associated with this stack frame, ornull
if this stack frame represents a static method.boolean
Returns whether the method associated with this stack frame is a constructor.boolean
isNative()
Returns whether the method associated with this stack frame has been declared as native.boolean
Returns whether the method associated with this stack frame is obsolete, that is, it is running old byte codes that have been replaced in the VM.boolean
Returns whether the method associated with this stack frame is running code in the VM that is out of synch with the code in the workspace.boolean
Returns whether the method associated with this stack frame is a static initializer.boolean
Returns whether the method associated with this stack frame has been declared as synchronized.boolean
Returns whether the method associated with this stack frame accepts a variable number of arguments.boolean
Deprecated.since 3.1, IJavaStackFrame extends org.eclipse.debug.core.IDropToFrame which defines canDropToFrame().boolean
Returns whether local variable information was available when local variables were retrieved from the target for this frame.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
Methods inherited from interface org.eclipse.debug.core.model.IDropToFrame
canDropToFrame, dropToFrame
Methods inherited from interface org.eclipse.debug.core.model.IFilteredStep
canStepWithFilters, stepWithFilters
Methods inherited from interface org.eclipse.jdt.debug.core.IJavaModifiers
isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic
Methods inherited from interface org.eclipse.debug.core.model.IStackFrame
getCharEnd, getCharStart, getLineNumber, getName, getRegisterGroups, getThread, getVariables, hasRegisterGroups, hasVariables
Methods inherited from interface org.eclipse.debug.core.model.IStep
canStepInto, canStepOver, canStepReturn, isStepping, stepInto, stepOver, stepReturn
Methods inherited from interface org.eclipse.debug.core.model.ISuspendResume
canResume, canSuspend, isSuspended, resume, suspend
Methods inherited from interface org.eclipse.debug.core.model.ITerminate
canTerminate, isTerminated, terminate
-
Field Details
-
ERR_INVALID_STACK_FRAME
static final int ERR_INVALID_STACK_FRAMEStatus code indicating a stack frame is invalid. A stack frame becomes invalid when the thread containing the stack frame resumes. A stack frame may or may not be valid if the thread subsequently suspends, depending on the location where the thread suspends.- Since:
- 3.1
- See Also:
-
-
Method Details
-
supportsDropToFrame
Deprecated.since 3.1, IJavaStackFrame extends org.eclipse.debug.core.IDropToFrame which defines canDropToFrame(). Use this method instead.Returns whether this stack frame currently supports the drop to frame operation. Note that not all VMs support the operation.- Returns:
- whether this stack frame currently supports drop to frame
-
isConstructor
boolean isConstructor() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame is a constructor.- Returns:
- whether this stack frame is associated with a constructor
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
isNative
boolean isNative() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame has been declared as native.- Returns:
- whether this stack frame has been declared as native
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
isStaticInitializer
boolean isStaticInitializer() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame is a static initializer.- Returns:
- whether this stack frame is a static initializer
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
isSynchronized
boolean isSynchronized() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame has been declared as synchronized.- Returns:
- whether this stack frame has been declared as synchronized
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
isOutOfSynch
boolean isOutOfSynch() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame is running code in the VM that is out of synch with the code in the workspace.- Returns:
- whether this stack frame is out of synch with the workspace.
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 2.0
-
isObsolete
boolean isObsolete() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame is obsolete, that is, it is running old byte codes that have been replaced in the VM. This can occur when a hot code replace succeeds but the VM is unable to pop a call to an affected method from the call stack.- Returns:
- whether this stack frame's method is obsolete
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 2.0
-
getDeclaringTypeName
Returns the fully qualified name of the type that declares the method associated with this stack frame.- Returns:
- declaring type name
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getReceivingTypeName
Returns the fully qualified name of the type that is the receiving object associated with this stack frame- Returns:
- receiving type name
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getSignature
Returns the JNI signature for the method this stack frame is associated with.- Returns:
- signature
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getArgumentTypeNames
Returns a list of fully qualified type names of the arguments for the method associated with this stack frame.- Returns:
- argument type names, or an empty list if this method has no arguments
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getMethodName
Returns the name of the method associated with this stack frame- Returns:
- method name
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
findVariable
Returns the local, static, or "this" variable with the given name, ornull
if unable to resolve a variable with the name.- Parameters:
variableName
- the name of the variable to search for- Returns:
- a variable, or
null
if none - Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getLineNumber
Returns the line number of the instruction pointer in this stack frame that corresponds to the line in the associated source element in the specified stratum, or-1
if line number information is unavailable.- Parameters:
stratum
- the stratum to use.- Returns:
- line number of instruction pointer in this stack frame, or
-1
if line number information is unavailable - Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the debug target. The DebugException's status code contains the underlying exception responsible for the failure.
- Since:
- 3.0
-
getSourceName
Returns the source name debug attribute associated with the declaring type of this stack frame, ornull
if the source name debug attribute not present.- Returns:
- source name debug attribute, or
null
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getSourceName
Returns the source name debug attribute associated with the declaring type of this stack frame in the specified stratum, ornull
if the source name debug attribute not present.- Parameters:
stratum
- the stratum to use.- Returns:
- source name debug attribute, or
null
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 3.0
-
getSourcePath
Returns the source path debug attribute associated with this stack frame in the specified stratum, ornull
if the source path is not known.- Parameters:
stratum
- the stratum to use.- Returns:
- source path debug attribute, or
null
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 3.0
-
getSourcePath
Returns the source path debug attribute associated with this stack frame, ornull
if the source path is not known.- Returns:
- source path debug attribute, or
null
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 3.0
-
getLocalVariables
Returns a collection of local variables that are visible at the current point of execution in this stack frame. The list includes arguments.- Returns:
- collection of locals and arguments
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 2.0
-
getThis
Returns a reference to the receiver of the method associated with this stack frame, ornull
if this stack frame represents a static method.- Returns:
- 'this' object, or
null
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
-
getDeclaringType
Deprecated.UsegetReferenceType()
instead, as a method is not restricted to occur in a class. An interface may contain a synthetic class initializer methods. Since 3.1, this method throws aDebugException
when a stack frame's method is contained in an interface.Returns the class in which this stack frame's method is declared.- Returns:
- the class in which this stack frame's method is declared
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 2.0
-
getReferenceType
Returns the type in which this stack frame's method is declared.- Returns:
- the type in which this stack frame's method is declared
- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 3.1
-
wereLocalsAvailable
boolean wereLocalsAvailable()Returns whether local variable information was available when local variables were retrieved from the target for this frame. Returnstrue
if locals have never been retrieved. This data is available after the fact, since variable retrieval is expensive.- Returns:
- whether local variable information was available when variables
were retrieved from the target. Returns
true
if locals have never been retrieved - Since:
- 2.0
-
isVarArgs
boolean isVarArgs() throws org.eclipse.debug.core.DebugExceptionReturns whether the method associated with this stack frame accepts a variable number of arguments.- Returns:
true
if the method associated with this stack frame accepts a variable number of arguments,false
otherwise.- Throws:
org.eclipse.debug.core.DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This stack frame is no longer valid. That is, the thread containing this stack frame has since been resumed.
- Since:
- 3.1
-
canForceReturn
boolean canForceReturn()Returns whether this frame currently supports a force return operation. That is, can this method force a return before it reaches a return statement. Not all VMs support this feature.Force return is only available when a thread is suspended.
- Returns:
- whether force return can be performed currently
- Since:
- 3.3
-
forceReturn
Steps out of this frame's method returning the given value. No further instructions in the method are executed but locks acquired by entering synchronized blocks are released. The following conditions must be satisfied:- This frame must be suspended in a non-native method.
- The return value must be assignment compatible with this frame's
method's return type. Use a void value when a method return type is void
(see
IJavaDebugTarget.voidValue()
).
- Parameters:
value
- return value that must be assignment compatible with this frame's method's return value- Throws:
org.eclipse.debug.core.DebugException
- if the operation fails- Since:
- 3.3
-
getReferenceType()
instead, as a method is not restricted to occur in a class.