Class Overview
An implementation of this class is provided, but the documented constructor
can be used by the VM specific implementation to create instances.
StackTraceElement represents a stack frame.
Summary
| Public Methods |
|
boolean
|
equals(Object obj)
Compare this object with the object passed in
|
|
String
|
getClassName()
Returns the full name (i.e.
|
|
String
|
getFileName()
If available, returns the name of the file containing the Java code
source which was compiled into the class where this stack trace element
is executing.
|
|
int
|
getLineNumber()
If available, returns the line number in the source for the class where
this stack trace element is executing.
|
|
String
|
getMethodName()
Returns the name of the method where this stack trace element is
executing.
|
|
int
|
hashCode()
Return this StackTraceElement objects hash code
|
|
boolean
|
isNativeMethod()
Returns true if the method name returned by
getMethodName() is implemented as a native method.
|
|
String
|
toString()
Return a String representing this StackTraceElement object
|
|
[Expand]
Inherited Methods |
From class java.lang.Object
|
Object
|
clone()
Returns a new instance of the same class as the receiver, whose slots
have been filled in with the values in the slots of the receiver.
|
|
boolean
|
equals(Object o)
Compares the argument to the receiver, and returns true if they represent
the same object using a class specific comparison.
|
|
void
|
finalize()
Called by the virtual machine when there are no longer any (non-weak)
references to the receiver.
|
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of java.lang.Class which represents the class
of the receiver.
|
|
int
|
hashCode()
Returns an integer hash code for the receiver.
|
|
final
void
|
notify()
Causes one thread which is wait ing on the receiver to be
made ready to run.
|
|
final
void
|
notifyAll()
Causes all threads which are wait ing on the receiver to
be made ready to run.
|
|
String
|
toString()
Returns a string containing a concise, human-readable description of the
receiver.
|
|
final
void
|
wait(long time, int frac)
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll) or the expiration of
the timeout.
|
|
final
void
|
wait(long time)
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll) or the expiration of
the timeout.
|
|
final
void
|
wait()
Causes the thread which sent this message to be made not ready to run
pending some change in the receiver (as indicated by notify
or notifyAll).
|
|
Public Constructors
public
StackTraceElement
(String cls, String method, String file, int line)
Constructs a StackTraceElement for an execution point.
Parameters
| cls
| The fully qualified name of the class where execution is at. |
| method
| The name of the method where execution is at. |
| file
| The name of the file where execution is at or
null. |
| line
| The line of the file where execution is at, a negative number
if unknown or -2 if the execution is in a native
method. |
Public Methods
public
boolean
equals
(Object obj)
Compare this object with the object passed in
Parameters
| obj
| Object to compare with
|
Returns
- boolean
true if the object is the same as this
object false if it is different from this object.
public
String
getClassName
()
Returns the full name (i.e. including the package) of the class where
this stack trace element is executing.
Returns
- the fully qualified type name of the class where this stack trace
element is executing.
public
String
getFileName
()
If available, returns the name of the file containing the Java code
source which was compiled into the class where this stack trace element
is executing.
Returns
- if available, the name of the file containing the Java code
source for the stack trace element's executing class. If no such
detail is available, a
null value is returned.
public
int
getLineNumber
()
If available, returns the line number in the source for the class where
this stack trace element is executing.
Returns
- if available, the line number in the source file for the class
where this stack trace element is executing. If no such detail is
available, a number less than
0.
public
String
getMethodName
()
Returns the name of the method where this stack trace element is
executing.
Returns
- the name of the method where this stack trace element is
executing.
public
int
hashCode
()
Return this StackTraceElement objects hash code
public
boolean
isNativeMethod
()
Returns true if the method name returned by
getMethodName() is implemented as a native method.
Returns
- if the method in which this stack trace element is executing is a
native method
public
String
toString
()
Return a String representing this StackTraceElement object
Returns
- String representing this object