|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mirrormap.Utils
public abstract class Utils
Utility methods and constants.
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static void |
logException(Logger log,
Object context,
Exception e)
Log an exception to WARN or System.err if the log level is
not enabled. |
static String |
safeToString(Object target)
Invoke the toString() method on the target. |
static String |
string(Object source,
String message)
Produces a string representation of a source object class with a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static void logException(Logger log, Object context, Exception e)
System.err
if the log level is
not enabled.
log
- the logger to use, if null then the Utils logger is
usedcontext
- the context message for the exceptione
- the exceptionpublic static String safeToString(Object target)
toString()
method on the target. If an exception
occurs, a standard error string is returned.
target
- the target to invoke the toString()
method on
toString()
method or a standard
error stringpublic static String string(Object source, String message)
source
- the source object class for the string messagemessage
- a message to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |