|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.kernel.log.impl.AbstractStackTrace
public abstract class AbstractStackTrace
This the base class for all stack tracers and provides the generic functionality
| Constructor Summary | |
|---|---|
protected |
AbstractStackTrace()
|
| Method Summary | |
|---|---|
protected void |
clear()
Resets the members |
protected abstract String |
currentStackLine(Throwable throwable,
int level)
This returns the a specific line in the given throwable (stack trace) that corresponds to level. |
String |
getClassname()
Returns the full class name including the class' package. |
String |
getFilename()
Returns the file name. |
int |
getLineNumber()
Returns the line number. |
String |
getLineNumberString()
Returns the line number as string. |
String |
getMethod()
Returns the method name. |
String |
getShortClassname()
Returns the short class name without the class' package. |
static String |
getTraceInfo(Throwable ex)
Returns the trace information for a given exception if available. |
protected abstract void |
parse(String raw)
Breaks the given line into a class name, line number, function, etc. |
void |
setClassname(String classname)
Sets the classname |
void |
setFilename(String filename)
Sets the file name. |
protected abstract void |
setLevel(int numLevelsUp)
Sets the desired depth of in a stack trace that properly indicates the callers level in the stack trace. |
void |
setLineNumber(int lineNr)
Sets the line number. |
void |
setMethod(String method)
Sets the method name. |
String |
toString()
Returns a StackTrace as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractStackTrace()
| Method Detail |
|---|
protected abstract String currentStackLine(Throwable throwable,
int level)
throwable - a Throwablelevel - a stack trace level we're interested inprotected abstract void setLevel(int numLevelsUp)
numLevelsUp - the stack trace level we're interested inprotected abstract void parse(String raw)
raw - a line from the stack tracepublic static String getTraceInfo(Throwable ex)
ex - a java standard exception. No ServiceException allowed.
protected void clear()
public String getClassname()
getClassname in interface LogLocationpublic String getShortClassname()
public String getMethod()
getMethod in interface LogLocationpublic String getFilename()
public int getLineNumber()
getLineNumber in interface LogLocationpublic String getLineNumberString()
public void setClassname(String classname)
public void setMethod(String method)
public void setFilename(String filename)
public void setLineNumber(int lineNr)
lineNr - a line numberpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||