📅  最后修改于: 2020-11-15 03:05:43             🧑  作者: Mango
java.lang.StackTraceElement类元素表示单个堆栈框架。除堆栈顶部的所有框架外,所有其他框架均表示方法调用。堆栈顶部的框架表示生成堆栈跟踪的执行点。
以下是java.lang.StackTraceElement类的声明-
public final class StackTraceElement
extends Object
implements Serializable
Sr.No. | Constructor & Description |
---|---|
1 |
StackTraceElement(String declaringClass, String methodName, String fileName, int lineNumber) This creates a stack trace element representing the specified execution point. |
Sr.No. | Method & Description |
---|---|
1 | boolean equals(Object obj)
This method returns true if the specified object is another StackTraceElement instance representing the same execution point as this instance. |
2 | String getClassName()
This method returns the fully qualified name of the class containing the execution point represented by this stack trace element. |
3 | String getFileName()
This method returns the name of the source file containing the execution point represented by this stack trace element. |
4 | int getLineNumber()
This method returns the line number of the source line containing the execution point represented by this stack trace element. |
5 | String getMethodName()
This method returns the name of the method containing the execution point represented by this stack trace element. |
6 | int hashCode()
This method returns a hash code value for this stack trace element. |
7 | boolean isNativeMethod()
This method returns true if the method containing the execution point represented by this stack trace element is a native method. |
8 | String toString()
This method returns a string representation of this stack trace element. |
此类从以下类继承方法-