|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taco.text.AbstractInterpolatingStringToObjectConverter
com.taco.text.InterpolatingConverter
com.taco.text.StringConverter
public class StringConverter
A converter from both resource bundles and strings to strings.
Field Summary | |
---|---|
static StringConverter |
instance
The default instance of this class. |
Fields inherited from class com.taco.text.InterpolatingConverter |
---|
_BAD_OBJECT_MAPPER, _IGNORE_PROPERTY_VALUE, _IMPORTS, _STATIC_IMPORTS, _TO_OBJECT_MAPPER_CONVERTER, DEFAULT_INSTANCE |
Fields inherited from class com.taco.text.AbstractInterpolatingStringToObjectConverter |
---|
_defArgMap, _defBundle |
Constructor Summary | |
---|---|
protected |
StringConverter()
Create a new instance whose implementation of IStringToObjectConverter is incapable of resolving
references. |
|
StringConverter(java.util.ResourceBundle bundle,
INoReturnMap argMap)
Create a new instance whose implementation of IStringToObjectConverter uses the specified resource
bundle and argument map to resolve references. |
Method Summary | |
---|---|
protected java.lang.Object |
_toObject(java.util.ResourceBundle bundle,
java.lang.String baseKey,
INoReturnMap argMap,
KeyLookupRecord context,
java.lang.String globalName)
If baseKey is mapped to null , return
null . |
static void |
main(java.lang.String[] args)
A simple test program. |
java.lang.String |
toString(java.util.ResourceBundle bundle,
java.lang.String baseKey,
INoReturnMap argMap)
Call toObject() with the same argument and cast the result
to a String . |
java.lang.String |
toString(java.lang.String s,
java.util.ResourceBundle bundle,
INoReturnMap argMap)
Call toObject() with the same argument and cast the result
to a String . |
Methods inherited from class com.taco.text.InterpolatingConverter |
---|
_argMapReferenceToObject, _getStandardImports, _getStandardStaticImports, _literalResultToObject, _literalToObject, _scriptSnippetToObject, _toObjectMapper, clone, name, toObject, toObject, toObject |
Methods inherited from class com.taco.text.AbstractInterpolatingStringToObjectConverter |
---|
toObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final StringConverter instance
Constructor Detail |
---|
protected StringConverter()
IStringToObjectConverter
is incapable of resolving
references. Since the default instance uses this constructor, this
is protected.
public StringConverter(java.util.ResourceBundle bundle, INoReturnMap argMap)
IStringToObjectConverter
uses the specified resource
bundle and argument map to resolve references.
Method Detail |
---|
public java.lang.String toString(java.lang.String s, java.util.ResourceBundle bundle, INoReturnMap argMap) throws java.text.ParseException, java.util.MissingResourceException
toObject()
with the same argument and cast the result
to a String
. This is a convenience method.
java.text.ParseException
java.util.MissingResourceException
public java.lang.String toString(java.util.ResourceBundle bundle, java.lang.String baseKey, INoReturnMap argMap) throws java.text.ParseException, java.util.MissingResourceException
toObject()
with the same argument and cast the result
to a String
. This is a convenience method.
java.text.ParseException
java.util.MissingResourceException
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
baseKey
is mapped to null
, return
null
. If it is mapped to a string, convert it to another
string using this instance as a string to string converter. Otherwise,
convert the mapped value to a string by calling its
toString()
method.
_toObject
in class InterpolatingConverter
java.text.ParseException
java.util.MissingResourceException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |