|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.util.Utils
public abstract class Utils
Utility methods and constants.
| Field Summary | |
|---|---|
static String |
BACKSPACE
The backspace character (escaped) '\\' |
static String |
CLOSE_BRACE
Close brace ')' |
static String |
CLOSE_CURLY
Close curly brace '}' |
static String |
CLOSE_SQUARE
Close square brace ']' |
static String |
COLON
Colon ':' |
static String |
COMMA
Comma ',' |
static String |
COMMA_SPACE
Comma followed by space ', ' |
static String |
DOT
Full stop or dot '.' |
static String |
EMPTY_STRING
The empty string |
static String |
EQUALS
Equals '=' |
static String |
OPEN_BRACE
Open brace '(' |
static String |
OPEN_CURLY
Open curly brace '{' |
static String |
OPEN_SQUARE
Open square brace '[' |
static String |
SPACE
Single space ' ' |
static String |
SPACING_4_CHARS
Standard 4 char spacing |
static String |
UNDERSCORE
The underscore character '_' |
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static void |
logException(org.apache.commons.logging.Log log,
Object context,
Exception e)
Log an exception to WARN or System.err if the log level is
not enabled. |
static void |
nullCheck(Object reference,
String message)
Check if the reference is null. |
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 |
| Field Detail |
|---|
public static final String COLON
public static final String EMPTY_STRING
public static final String SPACING_4_CHARS
public static final String CLOSE_SQUARE
public static final String OPEN_SQUARE
public static final String CLOSE_CURLY
public static final String OPEN_CURLY
public static final String CLOSE_BRACE
public static final String OPEN_BRACE
public static final String SPACE
public static final String COMMA
public static final String DOT
public static final String EQUALS
public static final String COMMA_SPACE
public static final String UNDERSCORE
public static final String BACKSPACE
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static void logException(org.apache.commons.logging.Log 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 string
public static String string(Object source,
String message)
source - the source object class for the string messagemessage - a message to add
public static void nullCheck(Object reference,
String message)
IllegalArgumentException with the message
reference - the reference to check for nullmessage - the exception message to use
IllegalArgumentException - if the reference is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||