java.lang.Object
com.ibm.dtfj.java.javacore.JCJavaLocation
- All Implemented Interfaces:
JavaLocation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionFetches the absolute address of the code which this location represents.int
Get the compilation level for this location.Get the source file name.int
Get the line number.Get the method which contains the point of execution.void
setAddress
(ImagePointer address) NON-DTFJvoid
setCompilation
(String compilationLevel) NON-DTFJvoid
setFilename
(String fileName) NON-DTFJvoid
setLineNumber
(int lineNumber) NON-DTFJtoString()
Answers a string containing a concise, human-readable description of the receiver.Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface com.ibm.dtfj.java.JavaLocation
equals, hashCode
-
Constructor Details
-
JCJavaLocation
- Throws:
JCInvalidArgumentsException
-
-
Method Details
-
getAddress
Description copied from interface:JavaLocation
Fetches the absolute address of the code which this location represents. This pointer will be contained within one of the segments returned by getBytecodeSections() or getCompiledSections() of the method returned by getMethod().null may be returned, particularly for methods with no bytecode or compiled sections (e.g. some native methods)
Although an offset into the method may be calculated using this pointer, caution should be exercised in attempting to map this offset to an offset within the original class file. Various transformations may have been applied to the bytecodes by the VM or other agents which may make the offset difficult to interpret.
For native methods, the address may be meaningless.
- Specified by:
getAddress
in interfaceJavaLocation
- Returns:
- the address in memory of the managed code
- Throws:
CorruptDataException
-
setAddress
NON-DTFJ- Parameters:
address
-
-
getCompilationLevel
Description copied from interface:JavaLocation
Get the compilation level for this location. This is an implementation defined number indicating the level at which the current location was compiled. 0 indicates interpreted. Any positive number indicates some level of JIT compilation. Typically, higher numbers indicate more aggressive compilation strategiesFor native methods, a non-zero compilation level indicates that some level of JIT compilation has been applied to the native call (e.g. a custom native call stub). To determine if the method is native, use getMethod().getModifiers().
- Specified by:
getCompilationLevel
in interfaceJavaLocation
- Returns:
- the compilation level
- Throws:
CorruptDataException
-
setCompilation
NON-DTFJ- Parameters:
compilationLevel
-
-
getFilename
Description copied from interface:JavaLocation
Get the source file name.- Specified by:
getFilename
in interfaceJavaLocation
- Returns:
- the name of the source file, if available, or throws DataUnavailable if it is not available
- Throws:
DataUnavailable
- if the source file name is unavailable in the coreCorruptDataException
-
setFilename
NON-DTFJ- Parameters:
fileName
-
-
getLineNumber
Description copied from interface:JavaLocation
Get the line number.- Specified by:
getLineNumber
in interfaceJavaLocation
- Returns:
- the line number, if available, or throws DataUnavailable if it is not available Line numbers are counted from 1
- Throws:
DataUnavailable
- if the line number data is not available for this locationCorruptDataException
-
setLineNumber
public void setLineNumber(int lineNumber) NON-DTFJ- Parameters:
lineNumber
-
-
getMethod
Description copied from interface:JavaLocation
Get the method which contains the point of execution.- Specified by:
getMethod
in interfaceJavaLocation
- Returns:
- the method which contains the point of execution
- Throws:
CorruptDataException
-
toString
Description copied from class:java.lang.Object
Answers a string containing a concise, human-readable description of the receiver.- Specified by:
toString
in interfaceJavaLocation
- Overrides:
toString
in classObject
- Returns:
- String a printable representation for the receiver.
-