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

public Class LocationImpl

extends MirrorImpl
implements Location
Class Inheritance
All Implemented Interfaces
com.sun.jdi.Location, java.lang.Comparable, com.sun.jdi.Mirror
Imports
com.sun.jdi.AbsentInformationException, .Location, .Method, .ReferenceType, .VirtualMachine

Field Summary

Modifier and TypeField and Description
private LineInfo
private long
private final ReferenceTypeImpl
private Method
private long
private LineInfo
Inherited from com.sun.tools.jdi.MirrorImpl:
vm

Constructor Summary

AccessConstructor and Description
pack-priv
LocationImpl(VirtualMachine vm, Method method, long codeIndex)

pack-priv
LocationImpl(VirtualMachine vm, ReferenceTypeImpl declaringType, long methodRef, long codeIndex)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
public long
codeIndex()

Implements com.sun.jdi.Location.codeIndex.

Gets the code position within this location's method.

public int
compareTo(Location other)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public ReferenceType
declaringType()

Implements com.sun.jdi.Location.declaringType.

Gets the type to which this Location belongs.

public boolean
equals(Object obj)

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

Implements com.sun.jdi.Location.equals.

Compares the specified Object with this Location for equality.

pack-priv LineInfo
pack-priv LineInfo
public int
hashCode()

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

Implements com.sun.jdi.Location.hashCode.

Returns the hash code value for this Location.

public int
lineNumber()

Implements com.sun.jdi.Location.lineNumber.

Gets the line number of this Location.

public int
lineNumber(String stratumID)

Implements com.sun.jdi.Location.lineNumber.

The line number of this Location.

pack-priv int
public Method
method()

Implements com.sun.jdi.Location.method.

Gets the method containing this Location.

public String
sourceName()

Implements com.sun.jdi.Location.sourceName.

Gets an identifying name for the source corresponding to this location.

public String
sourceName(String stratumID)

Implements com.sun.jdi.Location.sourceName.

Gets an identifying name for the source corresponding to this location.

pack-priv String
public String
sourcePath()

Implements com.sun.jdi.Location.sourcePath.

Gets the path to the source corresponding to this location.

public String
sourcePath(String stratumID)

Implements com.sun.jdi.Location.sourcePath.

Gets the path to the source corresponding to this location.

pack-priv String
public String
toString()

Overrides java.lang.Object.toString.

Implements com.sun.jdi.Mirror.toString.

Returns a String describing this mirror

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

Field Detail

baseLineInfoback to summary
private LineInfo baseLineInfo
codeIndexback to summary
private long codeIndex
declaringTypeback to summary
private final ReferenceTypeImpl declaringType
methodback to summary
private Method method
methodRefback to summary
private long methodRef
otherLineInfoback to summary
private LineInfo otherLineInfo

Constructor Detail

LocationImplback to summary
pack-priv LocationImpl(VirtualMachine vm, Method method, long codeIndex)
LocationImplback to summary
pack-priv LocationImpl(VirtualMachine vm, ReferenceTypeImpl declaringType, long methodRef, long codeIndex)

Method Detail

addBaseLineInfoback to summary
pack-priv void addBaseLineInfo(LineInfo lineInfo)
addStratumLineInfoback to summary
pack-priv void addStratumLineInfo(LineInfo lineInfo)
codeIndexback to summary
public long codeIndex()

Implements com.sun.jdi.Location.codeIndex.

Doc from com.sun.jdi.Location.codeIndex.

Gets the code position within this location's method.

compareToback to summary
public int compareTo(Location other)

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.

declaringTypeback to summary
public ReferenceType declaringType()

Implements com.sun.jdi.Location.declaringType.

Doc from com.sun.jdi.Location.declaringType.

Gets the type to which this Location belongs. Normally the declaring type is a ClassType, but executable locations also may exist within the static initializer of an InterfaceType.

equalsback to summary
public boolean equals(Object obj)

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

Implements com.sun.jdi.Location.equals.

Doc from com.sun.jdi.Location.equals.

Compares the specified Object with this Location for equality.

getBaseLineInfoback to summary
pack-priv LineInfo getBaseLineInfo(SDE.Stratum stratum)
getLineInfoback to summary
pack-priv LineInfo getLineInfo(SDE.Stratum stratum)
hashCodeback to summary
public int hashCode()

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

Implements com.sun.jdi.Location.hashCode.

Doc from com.sun.jdi.Location.hashCode.

Returns the hash code value for this Location.

lineNumberback to summary
public int lineNumber()

Implements com.sun.jdi.Location.lineNumber.

Doc from com.sun.jdi.Location.lineNumber.

Gets the line number of this Location.

This method is equivalent to lineNumber(vm.getDefaultStratum()) - see lineNumber(String) for more information.

lineNumberback to summary
public int lineNumber(String stratumID)

Implements com.sun.jdi.Location.lineNumber.

Doc from com.sun.jdi.Location.lineNumber.

The line number of this Location. The line number is relative to the source specified by sourceName(stratum).

Returned line number is for the specified stratum (see the class comment for a description of strata).

lineNumberback to summary
pack-priv int lineNumber(SDE.Stratum stratum)
methodback to summary
public Method method()

Implements com.sun.jdi.Location.method.

Doc from com.sun.jdi.Location.method.

Gets the method containing this Location.

sourceNameback to summary
public String sourceName() throws AbsentInformationException

Implements com.sun.jdi.Location.sourceName.

Doc from com.sun.jdi.Location.sourceName.

Gets an identifying name for the source corresponding to this location.

This method is equivalent to sourceName(vm.getDefaultStratum()) - see sourceName(String) for more information.

Exceptions
AbsentInformationException:
if the source name is not known
sourceNameback to summary
public String sourceName(String stratumID) throws AbsentInformationException

Implements com.sun.jdi.Location.sourceName.

Doc from com.sun.jdi.Location.sourceName.

Gets an identifying name for the source corresponding to this location. Interpretation of this string is the responsibility of the source repository mechanism.

Returned name is for the specified stratum (see the class comment for a description of strata).

The returned string is the unqualified name of the source file for this Location. For example, java.lang.Thread would return "Thread.java".

Exceptions
AbsentInformationException:
if the source name is not known
sourceNameback to summary
pack-priv String sourceName(SDE.Stratum stratum) throws AbsentInformationException
sourcePathback to summary
public String sourcePath() throws AbsentInformationException

Implements com.sun.jdi.Location.sourcePath.

Doc from com.sun.jdi.Location.sourcePath.

Gets the path to the source corresponding to this location.

This method is equivalent to sourcePath(vm.getDefaultStratum()) - see sourcePath(String) for more information.

Exceptions
AbsentInformationException:
if the source name is not known
sourcePathback to summary
public String sourcePath(String stratumID) throws AbsentInformationException

Implements com.sun.jdi.Location.sourcePath.

Doc from com.sun.jdi.Location.sourcePath.

Gets the path to the source corresponding to this location. Interpretation of this string is the responsibility of the source repository mechanism.

Returned path is for the specified stratum (see the class comment for a description of strata).

In the reference implementation, for strata which do not explicitly specify source path (the Java programming language stratum never does), the returned string is the package name of declaringType() converted to a platform dependent path followed by the unqualified name of the source file for this Location (sourceName(stratum)). For example, on a Windows platform, java.lang.Thread would return "java\lang\Thread.java".

Exceptions
AbsentInformationException:
if the source name is not known
sourcePathback to summary
pack-priv String sourcePath(SDE.Stratum stratum) throws AbsentInformationException
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