StackFrame
interface StackFrame
| java.lang.StackWalker.StackFrame | 
A StackFrame object represents a method invocation returned by StackWalker. 
 The getDeclaringClass() method may be unsupported as determined by the stack walking options of a stack walker.
Summary
| Public methods | |
|---|---|
| abstract Int | Returns the index to the  | 
| abstract String! | Gets the binary name of the declaring class of the method represented by this stack frame. | 
| abstract Class<*>! | Gets the declaring  | 
| open String! | Returns the descriptor of the method represented by this stack frame as defined by The Java Virtual Machine Specification. | 
| abstract String! | Returns the name of the source file containing the execution point represented by this stack frame. | 
| abstract Int | Returns the line number of the source line containing the execution point represented by this stack frame. | 
| abstract String! | Gets the name of the method represented by this stack frame. | 
| open MethodType! | Returns the  | 
| abstract Boolean | Returns  | 
| abstract StackTraceElement! | Gets a  | 
Public methods
getByteCodeIndex
abstract fun getByteCodeIndex(): Int
Returns the index to the insns array of a code_item containing the execution point represented by this stack frame. The code array gives the actual bytes of Dalvik bytecode that implement the method.
| Return | |
|---|---|
| Int | the index to the insnsarray of thecode_itemattribute containing the execution point represented by this stack frame, or a negative number if the method is native. | 
getClassName
abstract fun getClassName(): String!
Gets the binary name of the declaring class of the method represented by this stack frame.
| Return | |
|---|---|
| String! | the binary name of the declaring class of the method represented by this stack frame | 
getDeclaringClass
abstract fun getDeclaringClass(): Class<*>!
Gets the declaring Class for the method represented by this stack frame.
| Return | |
|---|---|
| Class<*>! | the declaring Classof the method represented by this stack frame | 
| Exceptions | |
|---|---|
| java.lang.UnsupportedOperationException | if this StackWalkeris not configured withOption.RETAIN_CLASS_REFERENCE. | 
getDescriptor
open fun getDescriptor(): String!
Returns the descriptor of the method represented by this stack frame as defined by The Java Virtual Machine Specification.
| Return | |
|---|---|
| String! | the descriptor of the method represented by this stack frame | 
getFileName
abstract fun getFileName(): String!
Returns the name of the source file containing the execution point represented by this stack frame. Generally, this corresponds to the SourceFile attribute of the relevant class file as defined by The Java Virtual Machine Specification. In some systems, the name may refer to some source code unit other than a file, such as an entry in a source repository.
| Return | |
|---|---|
| String! | the name of the file containing the execution point represented by this stack frame, or nullif this information is unavailable. | 
getLineNumber
abstract fun getLineNumber(): Int
Returns the line number of the source line containing the execution point represented by this stack frame. Generally, this is derived from the LineNumberTable attribute of the relevant class file as defined by The Java Virtual Machine Specification.
| Return | |
|---|---|
| Int | the line number of the source line containing the execution point represented by this stack frame, or a negative number if this information is unavailable. | 
getMethodName
abstract fun getMethodName(): String!
Gets the name of the method represented by this stack frame.
| Return | |
|---|---|
| String! | the name of the method represented by this stack frame | 
getMethodType
open fun getMethodType(): MethodType!
Returns the MethodType representing the parameter types and the return type for the method represented by this stack frame.
| Return | |
|---|---|
| MethodType! | the MethodTypefor this stack frame | 
| Exceptions | |
|---|---|
| java.lang.UnsupportedOperationException | if this StackWalkeris not configured withOption.RETAIN_CLASS_REFERENCE. | 
isNativeMethod
abstract fun isNativeMethod(): Boolean
Returns true if the method containing the execution point represented by this stack frame is a native method.
| Return | |
|---|---|
| Boolean | trueif the method containing the execution point represented by this stack frame is a native method. | 
toStackTraceElement
abstract fun toStackTraceElement(): StackTraceElement!
Gets a StackTraceElement for this stack frame.
| Return | |
|---|---|
| StackTraceElement! | StackTraceElementfor this stack frame. | 
