com.taco.text
Class MessageFormatConverter
java.lang.Object
com.taco.text.AbstractInterpolatingStringToObjectConverter
com.taco.text.InterpolatingConverter
com.taco.text.MessageFormatConverter
- All Implemented Interfaces:
- IInterpolatingConverter, IInterpolatingStringToObjectConverter, IStringToObjectConverter, IInterpolatingResourceBundleToObjectConverter, java.lang.Cloneable
public final class MessageFormatConverter
- extends InterpolatingConverter
A converter to instances of MessageFormat
.
Method Summary |
protected java.lang.Object |
_literalToObject(java.lang.String s,
java.util.ResourceBundle bundle,
INoReturnMap argMap,
java.lang.String globalName)
Given s , which is a string literal, not a reference to
a resource bundle key or a key in the argument map, convert
s to an object. |
protected java.lang.Object |
_toObject(java.util.ResourceBundle bundle,
java.lang.String baseKey,
INoReturnMap argMap,
KeyLookupRecord context,
java.lang.String globalName)
If the value associated with baseKey is a non-null string,
use this instance to convert it to an object. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class com.taco.text.InterpolatingConverter |
_argMapReferenceToObject, _getStandardImports, _getStandardStaticImports, _literalResultToObject, _scriptSnippetToObject, _toObjectMapper, clone, name, toObject, toObject, toObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final MessageFormatConverter instance
- The singleton instance of this class.
main
public static void main(java.lang.String[] args)
_toObject
protected java.lang.Object _toObject(java.util.ResourceBundle bundle,
java.lang.String baseKey,
INoReturnMap argMap,
KeyLookupRecord context,
java.lang.String globalName)
throws java.text.ParseException,
java.util.MissingResourceException
- Description copied from class:
InterpolatingConverter
- If the value associated with
baseKey
is a non-null string,
use this instance to convert it to an object. Otherwise, return the
object.
- Overrides:
_toObject
in class InterpolatingConverter
- Throws:
java.text.ParseException
java.util.MissingResourceException
_literalToObject
protected java.lang.Object _literalToObject(java.lang.String s,
java.util.ResourceBundle bundle,
INoReturnMap argMap,
java.lang.String globalName)
throws java.text.ParseException,
java.util.MissingResourceException
- Description copied from class:
InterpolatingConverter
Given s
, which is a string literal, not a reference to
a resource bundle key or a key in the argument map, convert
s
to an object.
*This implementation simply returns s
unchanged.
- Overrides:
_literalToObject
in class InterpolatingConverter
- Throws:
java.text.ParseException
java.util.MissingResourceException