|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.util.StackTrace
public final class StackTrace
Unscramble the current stack, and present the data from it to the user in various forms. This code is slightly dodgy in that it makes use of the way exceptions print their stack straces, however it is probably a safe enough assumption for the moment.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
Nested Class Summary | |
---|---|
class |
StackTrace.AbstractStackEnumeration
Base class for the real enumeration implementations below |
Field Summary | |
---|---|
(package private) String[] |
classNames
Array containing the class names |
private String[] |
fileNames
Array containing the file names |
private int[] |
lineNumbers
Array containing the line numbers |
private String[] |
methodNames
Array containing the method names |
Constructor Summary | |
---|---|
StackTrace()
Generate a stack trace an model it |
|
StackTrace(Throwable ex)
We already have an Exception that we'd like to model |
Method Summary | |
---|---|
int |
countStackElements()
How many stack elements are there? |
Class |
getClass(int level)
Get the Class that owns the function |
String |
getClassName(int level)
Get the name of a class |
Enumeration |
getClassNameElements()
To itterate over the class names |
String |
getFileName(int level)
Get the name of a file |
String |
getFullFunctionName(int level)
Get the name of a function including class name |
Enumeration |
getFullFunctionNameElements()
To itterate over the full function names |
String |
getFunctionName(int level)
Get the name of a function |
Enumeration |
getFunctionNameElements()
To itterate over the function names |
int |
getLineNumber(int level)
Get the line number within a file |
private void |
init(Throwable ex,
int disgard)
Create a stack trace of the code at this point |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
String[] classNames
private String[] methodNames
private String[] fileNames
private int[] lineNumbers
Constructor Detail |
---|
public StackTrace()
public StackTrace(Throwable ex)
ex
- The Exception to modelMethod Detail |
---|
private void init(Throwable ex, int disgard)
ex
- The Throwable containing the Stack Tracedisgard
- The number of uppermost stack frames to ignorepublic int countStackElements()
public String getFunctionName(int level)
level
- Number of calling functionpublic String getFullFunctionName(int level)
level
- Number of calling functionpublic String getClassName(int level)
level
- Number of calling functionpublic String getFileName(int level)
level
- Number of calling functionpublic int getLineNumber(int level)
level
- Number of calling functionpublic Class getClass(int level)
level
- Number of calling functionpublic Enumeration getClassNameElements()
public Enumeration getFunctionNameElements()
public Enumeration getFullFunctionNameElements()
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |