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

public Class LocalVariableImpl

extends MirrorImpl
implements LocalVariable, ValueContainer
Class Inheritance
All Implemented Interfaces
com.sun.tools.jdi.ValueContainer, com.sun.jdi.LocalVariable, java.lang.Comparable, com.sun.jdi.Mirror
Imports
com.sun.jdi.AbsentInformationException, .ClassNotLoadedException, .InternalException, .LocalVariable, .Location, .Method, .StackFrame, .Type, .VirtualMachine

Field Summary

Modifier and TypeField and Description
private String
private final Method
private final String
private final Location
private final Location
private final String
private final int
Inherited from com.sun.tools.jdi.MirrorImpl:
vm

Constructor Summary

AccessConstructor and Description
pack-priv
LocalVariableImpl(VirtualMachine vm, Method method, int slot, Location scopeStart, Location scopeEnd, String name, String signature, String genericSignature)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(LocalVariable object)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public boolean
equals(Object obj)

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

Implements com.sun.jdi.LocalVariable.equals.

Compares the specified Object with this LocalVariable for equality.

public Type
public String
genericSignature()

Implements com.sun.jdi.LocalVariable.genericSignature.

Gets the generic signature for this variable if there is one.

public int
hashCode()

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

Implements com.sun.jdi.LocalVariable.hashCode.

Returns the hash code value for this LocalVariable.

pack-priv boolean
public boolean
isArgument()

Implements com.sun.jdi.LocalVariable.isArgument.

Determines if this variable is an argument to its method.

public boolean
isVisible(StackFrame frame)

Implements com.sun.jdi.LocalVariable.isVisible.

Determines whether this variable can be accessed from the given StackFrame.

public String
name()

Implements com.sun.jdi.LocalVariable.name.

Gets the name of the local variable.

public String
pack-priv int
slot()

public String
toString()

Overrides java.lang.Object.toString.

Implements com.sun.jdi.Mirror.toString.

Returns a String describing this mirror

public Type
type()

Implements com.sun.jdi.LocalVariable.type, com.sun.tools.jdi.ValueContainer.type.

Returns the type of this variable.

public String

Returns:

a text representation of the declared type of this variable.
typeName
()

Implements com.sun.jdi.LocalVariable.typeName, com.sun.tools.jdi.ValueContainer.typeName.

Returns a text representation of the type of this variable.

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

Field Detail

genericSignatureback to summary
private String genericSignature
methodback to summary
private final Method method
nameback to summary
private final String name
scopeEndback to summary
private final Location scopeEnd
scopeStartback to summary
private final Location scopeStart
signatureback to summary
private final String signature
slotback to summary
private final int slot

Constructor Detail

LocalVariableImplback to summary
pack-priv LocalVariableImpl(VirtualMachine vm, Method method, int slot, Location scopeStart, Location scopeEnd, String name, String signature, String genericSignature)

Method Detail

compareToback to summary
public int compareTo(LocalVariable object)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

equalsback to summary
public boolean equals(Object obj)

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

Implements com.sun.jdi.LocalVariable.equals.

Doc from com.sun.jdi.LocalVariable.equals.

Compares the specified Object with this LocalVariable for equality.

findTypeback to summary
public Type findType(String signature) throws ClassNotLoadedException

Implements com.sun.tools.jdi.ValueContainer.findType.

genericSignatureback to summary
public String genericSignature()

Implements com.sun.jdi.LocalVariable.genericSignature.

Doc from com.sun.jdi.LocalVariable.genericSignature.

Gets the generic signature for this variable if there is one. Generic signatures are described in the The Java Virtual Machine Specification.

hashCodeback to summary
public int hashCode()

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

Implements com.sun.jdi.LocalVariable.hashCode.

Doc from com.sun.jdi.LocalVariable.hashCode.

Returns the hash code value for this LocalVariable.

hidesback to summary
pack-priv boolean hides(LocalVariable other)
isArgumentback to summary
public boolean isArgument()

Implements com.sun.jdi.LocalVariable.isArgument.

Doc from com.sun.jdi.LocalVariable.isArgument.

Determines if this variable is an argument to its method.

isVisibleback to summary
public boolean isVisible(StackFrame frame)

Implements com.sun.jdi.LocalVariable.isVisible.

Doc from com.sun.jdi.LocalVariable.isVisible.

Determines whether this variable can be accessed from the given StackFrame. See StackFrame#visibleVariables for a complete description variable visibility in this interface.

nameback to summary
public String name()

Implements com.sun.jdi.LocalVariable.name.

Doc from com.sun.jdi.LocalVariable.name.

Gets the name of the local variable.

signatureback to summary
public String signature()

Implements com.sun.jdi.LocalVariable.signature, com.sun.tools.jdi.ValueContainer.signature.

Doc from com.sun.jdi.LocalVariable.signature.

Gets the type signature of the local variable.

slotback to summary
pack-priv int slot()
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

typeback to summary
public Type type() throws ClassNotLoadedException

Implements com.sun.jdi.LocalVariable.type, com.sun.tools.jdi.ValueContainer.type.

Doc from com.sun.jdi.LocalVariable.type.

Returns the type of this variable. Where the type is the type specified in the declaration of this local variable.

Note

if the type of this variable is a reference type (class, interface, or array) and it has not been created or loaded by the class loader of the enclosing class, then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType#isPrepared() to determine if a reference type is prepared.

Exceptions
ClassNotLoadedException:
if the type has not yet been loaded through the appropriate class loader.
typeNameback to summary
public String typeName()

Implements com.sun.jdi.LocalVariable.typeName, com.sun.tools.jdi.ValueContainer.typeName.

Doc from com.sun.jdi.LocalVariable.typeName.

Returns a text representation of the type of this variable. Where the type is the type specified in the declaration of this local variable.

This type name is always available even if the type has not yet been created or loaded.

Returns:String

a text representation of the declared type of this variable.