Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.util.logging
Class Formatter

java.lang.Object
  extended by oracle.adfnmc.java.util.logging.Formatter
Direct Known Subclasses:
NmcPatternFormatter, SimpleFormatter

public abstract class Formatter
extends java.lang.Object

Formatter objects are used to format LogRecord objects into a string representation. Head and tail strings are sometime used to wrap a set of records. The getHead and getTail methods are presented for this purpose.


Constructor Summary
protected Formatter()
          Constructs a Formatter object.
 
Method Summary
abstract  java.lang.String format(LogRecord r)
          Formats a LogRecord object into a string representation.
 java.lang.String formatMessage(LogRecord r)
          Formats a LogRecord object into a localized string representation.
 java.lang.String getHead(Handler h)
          Gets the head string used to wrap a set of log records.
 java.lang.String getTail(Handler h)
          Gets the tail string used to wrap a set of log records.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

protected Formatter()
Constructs a Formatter object.

Method Detail

format

public abstract java.lang.String format(LogRecord r)
Formats a LogRecord object into a string representation. The resulted string is usually localized and includes the message field of the supplied LogRecord object.

Parameters:
r - the log record to be formatted into a string
Returns:
the string resulted from the formatting

formatMessage

public java.lang.String formatMessage(LogRecord r)
Formats a LogRecord object into a localized string representation. This method can be regarded as a convenience for subclasses of Formatter to use.

The message string is firstly localized using the ResourceBundle object associated with the supplied LogRecord.

Parameters:
r - the log record to be formatted
Returns:
the string resulted from the formatting

getHead

public java.lang.String getHead(Handler h)
Gets the head string used to wrap a set of log records. This base class always returns the empty string.

Parameters:
h - the target handler
Returns:
the head string used to wrap a set of log records

getTail

public java.lang.String getTail(Handler h)
Gets the tail string used to wrap a set of log records. This base class always returns the empty string.

Parameters:
h - the target handler
Returns:
the tail string used to wrap a set of log records

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.