diff --git a/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java b/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
index cf0a9b151..e576a92b6 100644
--- a/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
+++ b/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
@@ -28,11 +28,35 @@
import org.apache.commons.lang.Validate;
/**
- * Extends MessageFormat
to allow pluggable/additional formatting
- * options for embedded format elements; requires elaboration.
+ * Extends java.text.MessageFormat
to allow pluggable/additional formatting
+ * options for embedded format elements. Client code should specify a registry
+ * of FormatFactory
instances associated with String
+ * format names. This registry will be consulted when the format elements are
+ * parsed from the message pattern. In this way custom patterns can be specified,
+ * and the formats supported by java.text.MessageFormat
can be overridden
+ * at the format and/or format style level (@see MessageFormat). A "format element"
+ * embedded in the message pattern is specified (()? signifies optionality):
+ *
+ ** - * Note that the mutator methods for the replacement Formats are to be considered - * unnecessary and thus have been disabled (UnsupportedOperationException). + * format-name and format-style values are trimmed of surrounding whitespace + * in the manner of{
argument-number + * ( + *,
format-name + * (,
format-style)? + * )? + *}
+ *
java.text.MessageFormat
. If format-name denotes
+ * FormatFactory formatFactoryInstance
in registry
, a Format
+ * matching format-name and format-style is requested from
+ * formatFactoryInstance
. If this is successful, the Format
+ * found is used for this format element.
+ *
+ * NOTICE: The various subformat mutator methods are considered unnecessary; they exist on the parent
+ * class to allow the type of customization which it is the job of this class to provide in
+ * a configurable fashion. These methods have thus been disabled and will throw
+ * UnsupportedOperationException
s if called.
FormatFactory
to implement the "format style"
+ * concept from java.text.MessageFormat
.
* @param locale The locale, may be null
* @return The format instance
*/