Main Page | Class Hierarchy | Class List | Directories | Class Members | Related Pages

java.lang.StackTraceElement Class Reference

List of all members.

Detailed Description

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.

See also:
Throwable.getStackTrace()


Public Member Functions

boolean equals (Object obj)
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 ()
boolean isNativeMethod ()
 Returns true if the method name returned by getMethodName() is implemented as a native method.
String toString ()

Package Functions

 StackTraceElement (String cls, String method, String file, int line)
 Create a StackTraceElement from the parameters.

Package Attributes

String declaringClass
String methodName
String fileName
int lineNumber

Static Package Attributes

static final long serialVersionUID = 6992337162326171013L


Constructor & Destructor Documentation

java.lang.StackTraceElement.StackTraceElement String  cls,
String  method,
String  file,
int  line
[package]
 

Create a StackTraceElement from the parameters.

Parameters:
cls The class name
method The method name
file The file name
line The line number


Member Function Documentation

String java.lang.StackTraceElement.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.

String java.lang.StackTraceElement.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 excuting class. If no such detail is available, a null value is returned.

int java.lang.StackTraceElement.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 < 0.

String java.lang.StackTraceElement.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.

boolean java.lang.StackTraceElement.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


The documentation for this class was generated from the following file:
(c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable.