javax.tools.diagnostics.runtime.java
Interface JavaStackFrame


public interface JavaStackFrame

Represents a Java stack frame.


Method Summary
 boolean equals(java.lang.Object obj)
           
 ImagePointer getBasePointer()
          Get a pointer to the base of this stack frame within memory.
 java.util.List<JavaReference> getHeapRoots()
          A list of references to objects and classes from this stack frame.
 JavaLocation getLocation()
           Returns the JavaLocation that represents the location of this JavaStackFrame within the Java program.
 java.lang.Object getVariable(int slot)
          Gets the value of a variable from a stack frame.
 java.util.List<JavaVariable> getVariables()
          Gets all variables from the stack frame.
 int hashCode()
           
 

Method Detail

getBasePointer

ImagePointer getBasePointer()
                            throws CorruptDataException

Get a pointer to the base of this stack frame within memory.

The layout of a JavaStackFrame is implementation specific.

Returns:
the base pointer of the stack frame
Throws:
CorruptDataException

getLocation

JavaLocation getLocation()
                         throws CorruptDataException

Returns the JavaLocation that represents the location of this JavaStackFrame within the Java program.

Returns:
a location object describing where the frame is executing.
Throws:
CorruptDataException
See Also:
JavaLocation

getHeapRoots

java.util.List<JavaReference> getHeapRoots()

A list of references to objects and classes from this stack frame.

Returns the references to object and classes this Java Virtual Machine's implementation considers as being kept alive by this Java stack frame. As well as references from local variables and operations stack entries, this may also include a reference to the Java frame's class or to an object this stack frame is keeping alive through holding its monitor.

Returns:
a list of JavaReferences

getVariable

java.lang.Object getVariable(int slot)
                             throws CorruptDataException,
                                    DataUnavailable,
                                    java.lang.IndexOutOfBoundsException

Gets the value of a variable from a stack frame.

Returns a JavaObject for an object reference, null for a null object reference. Primitives are returned as boxed primitives. CorruptDataException is thrown if object reference is incorrect, or if the float or double are set to invalid values.

Parameters:
slot - - the numerical local variable slot number to retrieve.
Throws:
DataUnavailable - if this method is not supported or if stack not in correct state to return variables.
java.lang.IndexOutOfBoundsException - if an invalid slot number is passed.
CorruptDataException

getVariables

java.util.List<JavaVariable> getVariables()

Gets all variables from the stack frame.

Returns a List containing the available JavaVariables. While the method JavaMethod.getVariables() will return all local variables for a method, this method will return only those variables that are visible at the point of execution for this stack frame.


equals

boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
True if the given object refers to the same JavaStackFrame in the image

hashCode

int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2010. All Rights Reserved.