public static interface StackWalker.StackFrame
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.
| Modifier and Type | Method and Description |
|---|---|
String |
getClassName()
Gets the binary name
of the declaring class of the method represented by this stack frame.
|
Class<?> |
getDeclaringClass()
Gets the declaring
Class for the method represented by
this stack frame. |
Optional<String> |
getFileName()
Returns the name of the source file containing the execution point
represented by this stack frame.
|
OptionalInt |
getLineNumber()
Returns the line number of the source line containing the execution
point represented by this stack frame.
|
String |
getMethodName()
Gets the name of the method represented by this stack frame.
|
boolean |
isNativeMethod()
Returns
true if the method containing the execution point
represented by this stack frame is a native method. |
default StackTraceElement |
toStackTraceElement()
Gets a
StackTraceElement for this stack frame. |
String getClassName()
String getMethodName()
Class<?> getDeclaringClass()
Class for the method represented by
this stack frame.Class of the method represented by
this stack frameUnsupportedOperationException - if this StackWalker
is not configured with Option.RETAIN_CLASS_REFERENCE.Optional<String> getFileName()
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.Optional
is unavailable.SourceFile AttributeOptionalInt getLineNumber()
LineNumberTable attribute of the relevant
class file as defined by The Java Virtual Machine
Specification.Optional if this information is unavailable.LineNumberTable Attributeboolean isNativeMethod()
true if the method containing the execution point
represented by this stack frame is a native method.true if the method containing the execution point
represented by this stack frame is a native method.default StackTraceElement toStackTraceElement()
StackTraceElement for this stack frame.StackTraceElement for this stack frame. Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
DRAFT internal-b00