org.jscience.architecture.lift.util
Class EvenSimplerFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.SimpleFormatter
          extended by org.jscience.architecture.lift.util.EvenSimplerFormatter

public class EvenSimplerFormatter
extends java.util.logging.SimpleFormatter

DOCUMENT ME!


Constructor Summary
EvenSimplerFormatter()
          Constructor for the EvenSimplerFormatter object
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
          We have to override/hide/shadow the format() of SimpleFormatter.
static void main(java.lang.String[] args)
          The main (test) program for the EvenSimplerFormatter.
 java.lang.String tryToLocalize(java.lang.String Message, java.util.logging.LogRecord record)
          This Method is created to serve a simple goal: it must try to localize a string if it is possible.
 java.lang.String tryToLocalize(java.lang.String Message, java.util.ResourceBundle MyRB)
          This Method is create to serve a simple goal: it must try to localize a string if it is possible.
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvenSimplerFormatter

public EvenSimplerFormatter()
Constructor for the EvenSimplerFormatter object

Method Detail

format

public java.lang.String format(java.util.logging.LogRecord record)
We have to override/hide/shadow the format() of SimpleFormatter. As a matter of fact, we only have to override this one. Nice design.

Overrides:
format in class java.util.logging.SimpleFormatter
Parameters:
record - The LogRecord to format.
Returns:
The formatted, localized message.

main

public static void main(java.lang.String[] args)
The main (test) program for the EvenSimplerFormatter.

Parameters:
args - The command line arguments

tryToLocalize

public java.lang.String tryToLocalize(java.lang.String Message,
                                      java.util.ResourceBundle MyRB)
This Method is create to serve a simple goal: it must try to localize a string if it is possible. If localization is not possible, it will return the original string. In c it would be surely a macro or an inliner.

Parameters:
Message - The message to localize.
MyRB - A ResourceBundle that contains localization.
Returns:
The localized string on succes, the originial Message at failure.

tryToLocalize

public java.lang.String tryToLocalize(java.lang.String Message,
                                      java.util.logging.LogRecord record)
This Method is created to serve a simple goal: it must try to localize a string if it is possible. If localization is not possible, it will return the original string. In c it would be surely a macro or an inliner.

Parameters:
Message - The message to localize.
record - The LogRecord used to get the ResourceBundle.
Returns:
The localized string on succes, NULL (LogRecord) on null==record, or the originial Message at failure.