|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.haefelingerit.tagmod.Static
public class Static
This class contains static methods only. The class - as such - has no particular meaning and represents nothing.
| Field Summary | |
|---|---|
protected static Logger |
log
A logger for all classes in this package. |
| Constructor Summary | |
|---|---|
Static()
|
|
| Method Summary | |
|---|---|
static void |
close(InputStream s)
A method to close an input stream without throwing an exception. |
static void |
close(OutputStream s)
A method to close an output stream without throwing an exception. |
static void |
close(Reader r)
A method to close a reader without throwing an exception. |
static void |
close(Writer w)
A method to close a writer without throwing an exception. |
protected static void |
debug(String msg)
A function to log a message. |
protected static void |
error(String msg)
A function to log a message. |
protected static void |
error(String msg,
Exception e)
A function to log a message. |
protected static void |
fatal(String msg)
A function to log a message. |
protected static void |
fatal(String msg,
Exception e)
A function to log a message. |
protected static void |
info(String msg)
A function to log a message. |
protected static void |
log(String msg)
A function to log a message. |
static SimpleDateFormat |
mkdatefmt()
Returns a SimpleDateFormat suitable to parse a date string. |
protected static void |
throwx(String msg)
A function to throw an CruiseControl exception. |
static String |
trim(String s,
String otherwise)
A method to trim - remove leading and trailing whitespace - a string. |
protected static void |
warn(String msg)
A function to log a message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Logger log
Use something like
log4j.logger.net.haefelingerit.tagmod = DEBUGto turn on debugging in your
log4j configuration file.
| Constructor Detail |
|---|
public Static()
| Method Detail |
|---|
public static String trim(String s,
String otherwise)
s is null or if the trimmed value becomes
empty, then the second argument otherwise gets returned.
s - (can be null)otherwise - (can be null)
public static void close(Writer w)
DEBUG
- Parameters:
w - (can be null)
public static void close(Reader r)
DEBUG
- Parameters:
r - (can be null)
public static void close(InputStream s)
DEBUG
- Parameters:
s - (can be null)
public static void close(OutputStream s)
DEBUG
- Parameters:
s - (can be null)
protected static void log(String msg)
log.info(msg). See also log4j
for further details.
msg - protected static void info(String msg)
log.info(msg). See also log4j
for further details.
msg - protected static void debug(String msg)
log.debug(msg). See also log4j
for further details.
msg - protected static void error(String msg)
log.error(msg). See also log4j
for further details.
msg - protected static void warn(String msg)
log.warn(msg). See also log4j
for further details.
msg -
protected static void error(String msg,
Exception e)
log.error(msg). See also log4j
for further details.
msg - protected static void fatal(String msg)
log.fatal(msg). See also log4j
for further details.
msg -
protected static void fatal(String msg,
Exception e)
log.fatal(msg). See also log4j
for further details.
msg -
protected static void throwx(String msg)
throws CruiseControlException
throw new CruiseControlException(msg)
msg - (not null)
CruiseControlExceptionpublic static SimpleDateFormat mkdatefmt()
The format accepted will be yyyy-MM-dd HH:mm:ss UTC. Such a
date string is generated by tag handler script as log entry once a tag got
assigned. Note that this format is not the format CVS is using for its date
lines.
This function does not implement a singleton. Hence, each call returns a new date format object.
See also SimpleDateFormat for further formatting details.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||