|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.jaetzold.util.Debug
This class encapsulates common code for debugging
Field Summary | |
String |
className
Name of the class, including package-name. |
boolean |
debug
Reflects the value of the property className.debug at the time this class had been initialized. |
int |
errorLevel
Set verbosity of error messages. |
int |
infoLevel
Set verbosity of informational messages. |
String |
objectIdentifier
|
Constructor Summary | |
Debug(String className)
Constructs a new debug-object for the Class named className . |
Method Summary | |
String |
createObjectIdentifier()
|
String |
getCurrentStackTraceString()
|
String |
getIdentifierFor(Object o)
|
String |
getProperty(String name)
|
void |
printError(int level,
String message)
Print message on stdout if level<=errorLevel or debug==true. |
void |
printError(String message)
Print className and message on stderr |
void |
printInfo(int level,
String message)
Print message on stdout if level<=infoLevel or debug==true. |
void |
printInfo(String message)
Print className and message on stdout |
String |
stackTraceToString(Throwable t)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public String className
debug
public String objectIdentifier
public boolean debug
Example: If the package name is a.b and the class is called C, debug will be true if the property
className
,
printError(String)
,
printInfo(String)
public int errorLevel
debug
,
printError(int,String)
public int infoLevel
debug
,
printInfo(int,String)
Constructor Detail |
public Debug(String className)
className
.
The given String should be full qualified classname (including package-name) for the normal funtion of this Debug-Object but any String is possible as the name isn't used to access a class.Method Detail |
public String createObjectIdentifier()
public String getIdentifierFor(Object o)
public String getProperty(String name)
public String getCurrentStackTraceString()
public String stackTraceToString(Throwable t)
public void printError(String message)
className
,
printInfo(String)
public void printInfo(String message)
className
,
printError(String)
public void printInfo(int level, String message)
infoLevel
,
debug
public void printError(int level, String message)
errorLevel
,
debug
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |