java.lang.Object
org.dinopolis.util.debug.DebugMessageFormatObject
- Direct Known Subclasses:
- DebugMessageDATE, DebugMessageDIFFMILLISECONDS, DebugMessageLEVEL, DebugMessageMESSAGE, DebugMessageMILLISECONDS, DebugMessageSTACKTRACE, DebugMessageSTACKTRACELINE, DebugMessageTHREAD, DebugMessageTHREADGROUP, DebugMessageTHREADNAME
- public abstract class DebugMessageFormatObject
- extends java.lang.Object
This class is the baseclass for all objects responsible for the
formatting of the Debug message.
As these objects are created by a factory, all subclasses must be
named "DebugMessageFORMATSTRING" (formatstring in uppercase).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DebugMessageFormatObject
public DebugMessageFormatObject()
- Empty default constructor (all subclasses are created by a factory).
getEvaluatedKeyword
public abstract java.lang.String getEvaluatedKeyword(java.lang.String level,
java.lang.String debug_message,
Debug debug_instance)
- This is the method to override on subclasses. It is called whenever
an evaluation of the keyword in the format string of the debug
messages is needed. The given arguments can be used by the subclass:
e.g. the subclass DebugMessageLETTERCOUNT might return here the
number of letters in the debug message (as a String). Other classes
may ignore all arguments: e.g. DebugMessageDATE returns the
current date/time, no matter what debug message/level is
given. Other subclasses again might need the Debug-instance to
obtain special information stored there:
DebugMessageDIFFMILLISECONDS needs the time the last debug message
was printed. This information can be retrieved from the Debug
instance.