Package org.apache.fop.events
Class EventFormatter
java.lang.Object
org.apache.fop.events.EventFormatter
Converts events into human-readable, localized messages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic classPartFactory for lookups. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate static org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringFormats an event using the default locale.static StringFormats the event using a given pattern.static StringFormats an event using a given locale.private static Stringformat(Event event, ResourceBundle bundle) private static ResourceBundleprivate static StringprocessIncludes(String template, ResourceBundle bundle) private static intprocessIncludesInner(CharSequence template, StringBuffer sb, ResourceBundle bundle)
-
Field Details
-
INCLUDES_PATTERN
-
log
private static org.apache.commons.logging.Log log
-
-
Constructor Details
-
EventFormatter
private EventFormatter()
-
-
Method Details
-
getBundle
-
format
Formats an event using the default locale.- Parameters:
event- the event- Returns:
- the formatted message
-
format
Formats an event using a given locale.- Parameters:
event- the eventlocale- the locale- Returns:
- the formatted message
-
format
-
processIncludes
-
processIncludesInner
private static int processIncludesInner(CharSequence template, StringBuffer sb, ResourceBundle bundle) -
format
Formats the event using a given pattern. The pattern needs to be compatible withAdvancedMessageFormat.- Parameters:
event- the eventpattern- the pattern (compatible withAdvancedMessageFormat)- Returns:
- the formatted message
-