APIdia Launch Partner
Top Fields Constructors Methods
com.sun.tools.jdi

public Class StackFrameImpl

extends MirrorImpl
implements StackFrame, ThreadListener
Class Inheritance
All Implemented Interfaces
com.sun.tools.jdi.ThreadListener, java.util.EventListener, com.sun.jdi.StackFrame, com.sun.jdi.Locatable, com.sun.jdi.Mirror
Imports
java.util.ArrayList, .Arrays, .Collections, .HashMap, .List, .Map, com.sun.jdi.AbsentInformationException, .ClassNotLoadedException, .IncompatibleThreadStateException, .InternalException, .InvalidStackFrameException, .InvalidTypeException, .LocalVariable, .Location, .Method, .NativeMethodException, .ObjectReference, .OpaqueFrameException, .StackFrame, .ThreadReference, .Value, .VirtualMachine

Field Summary

Modifier and TypeField and Description
private final long
private boolean
private final Location
private ObjectReference
private final ThreadReferenceImpl
private Map<String, LocalVariable>
Inherited from com.sun.tools.jdi.MirrorImpl:
vm

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
createVisibleVariables()

Build the visible variable map.

public boolean
equals(Object obj)

Overrides com.sun.tools.jdi.MirrorImpl.equals.

Indicates whether some other object is "equal to" this one.

public List<Value>
getArgumentValues()

Implements com.sun.jdi.StackFrame.getArgumentValues.

Returns the values of all arguments in this frame.

public Value
getValue(LocalVariable variable)

Implements com.sun.jdi.StackFrame.getValue.

Gets the Value of a LocalVariable in this frame.

public Map<LocalVariable, Value>
getValues(List<? extends LocalVariable> variables)

Implements com.sun.jdi.StackFrame.getValues.

Returns the values of multiple local variables in this frame.

public int
hashCode()

Overrides com.sun.tools.jdi.MirrorImpl.hashCode.

Returns a hash code value for this object.

public Location
location()

Implements com.sun.jdi.StackFrame.location.

Return the frame location.

pack-priv void
pop()

public void
setValue(LocalVariable variableIntf, Value valueIntf)

Implements com.sun.jdi.StackFrame.setValue.

Sets the Value of a LocalVariable in this frame.

public ObjectReference
thisObject()

Implements com.sun.jdi.StackFrame.thisObject.

Returns the value of 'this' for the current frame.

public ThreadReference
thread()

Implements com.sun.jdi.StackFrame.thread.

Return the thread holding the frame.

public boolean
public String
toString()

Overrides java.lang.Object.toString.

Implements com.sun.jdi.Mirror.toString.

Returns a String describing this mirror

pack-priv void
public LocalVariable
visibleVariableByName(String name)

Implements com.sun.jdi.StackFrame.visibleVariableByName.

Return a particular variable in the frame.

public List<LocalVariable>
visibleVariables()

Implements com.sun.jdi.StackFrame.visibleVariables.

Return the list of visible variable in the frame.

Inherited from com.sun.tools.jdi.MirrorImpl:
validateMirrorvalidateMirrorOrNullvalidateMirrorsvalidateMirrorsOrNullsvirtualMachine

Field Detail

idback to summary
private final long id
isValidback to summary
private boolean isValid
locationback to summary
private final Location location
thisObjectback to summary
private ObjectReference thisObject
threadback to summary
private final ThreadReferenceImpl thread
visibleVariablesback to summary
private Map<String, LocalVariable> visibleVariables

Constructor Detail

StackFrameImplback to summary
pack-priv StackFrameImpl(VirtualMachine vm, ThreadReferenceImpl thread, long id, Location location)

Method Detail

createVisibleVariablesback to summary
private void createVisibleVariables() throws AbsentInformationException

Build the visible variable map. Need not be synchronized since it cannot be provably stale.

equalsback to summary
public boolean equals(Object obj)

Overrides com.sun.tools.jdi.MirrorImpl.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

getArgumentValuesback to summary
public List<Value> getArgumentValues()

Implements com.sun.jdi.StackFrame.getArgumentValues.

Doc from com.sun.jdi.StackFrame.getArgumentValues.

Returns the values of all arguments in this frame. Values are returned even if no local variable information is present.

getValueback to summary
public Value getValue(LocalVariable variable)

Implements com.sun.jdi.StackFrame.getValue.

Doc from com.sun.jdi.StackFrame.getValue.

Gets the Value of a LocalVariable in this frame. The variable must be valid for this frame's method and visible according to the rules described in visibleVariables.

getValuesback to summary
public Map<LocalVariable, Value> getValues(List<? extends LocalVariable> variables)

Implements com.sun.jdi.StackFrame.getValues.

Doc from com.sun.jdi.StackFrame.getValues.

Returns the values of multiple local variables in this frame. Each variable must be valid for this frame's method and visible according to the rules described in visibleVariables.

hashCodeback to summary
public int hashCode()

Overrides com.sun.tools.jdi.MirrorImpl.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
locationback to summary
public Location location()

Implements com.sun.jdi.StackFrame.location.

Return the frame location. Need not be synchronized since it cannot be provably stale.

popback to summary
pack-priv void pop() throws IncompatibleThreadStateException
setValueback to summary
public void setValue(LocalVariable variableIntf, Value valueIntf) throws InvalidTypeException, ClassNotLoadedException

Implements com.sun.jdi.StackFrame.setValue.

Doc from com.sun.jdi.StackFrame.setValue.

Sets the Value of a LocalVariable in this frame. The variable must be valid for this frame's method and visible according to the rules described in visibleVariables.

In the case of virtual threads, the target VM supports setting values of local variables when this frame is the topmost frame and the thread is suspended at an event. The target VM may support setting local variables in other cases.

Object values must be assignment compatible with the variable type (This implies that the variable type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the variable type or must be convertible to the variable type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Exceptions
InvalidTypeException:
if the value's type does not match the variable's type.
ClassNotLoadedException:
if the variable type has not yet been loaded through the appropriate class loader.
thisObjectback to summary
public ObjectReference thisObject()

Implements com.sun.jdi.StackFrame.thisObject.

Doc from com.sun.jdi.StackFrame.thisObject.

Returns the value of 'this' for the current frame. The ObjectReference for 'this' is only available for non-native instance methods.

threadback to summary
public ThreadReference thread()

Implements com.sun.jdi.StackFrame.thread.

Return the thread holding the frame. Need not be synchronized since it cannot be provably stale.

threadResumableback to summary
public boolean threadResumable(ThreadAction action)

Implements com.sun.tools.jdi.ThreadListener.threadResumable.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements com.sun.jdi.Mirror.toString.

Doc from com.sun.jdi.Mirror.toString.

Returns a String describing this mirror

validateStackFrameback to summary
pack-priv void validateStackFrame()
visibleVariableByNameback to summary
public LocalVariable visibleVariableByName(String name) throws AbsentInformationException

Implements com.sun.jdi.StackFrame.visibleVariableByName.

Return a particular variable in the frame. Need not be synchronized since it cannot be provably stale.

Exceptions
AbsentInformationException:

Doc from com.sun.jdi.StackFrame.visibleVariableByName.

if there is no local variable information for this method.

visibleVariablesback to summary
public List<LocalVariable> visibleVariables() throws AbsentInformationException

Implements com.sun.jdi.StackFrame.visibleVariables.

Return the list of visible variable in the frame. Need not be synchronized since it cannot be provably stale.

Exceptions
AbsentInformationException:

Doc from com.sun.jdi.StackFrame.visibleVariables.

if there is no local variable information for this method.