|
||||||||||
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.AtomConverter
public class AtomConverter
An interpolating string and resource bundle converter of atomic data.
Once a literal string has been found, this class uses an instance of
StringToObjectConverter
to convert the string to an object.
Field Summary | |
---|---|
protected IStringToObjectConverter |
_stringConverter
The string converter that _ literalToObject() uses. |
static AtomConverter |
BOOLEAN_CONVERTER
A converter to instances of Boolean . |
static AtomConverter |
CHARACTER_CONVERTER
A converter to instances of Character . |
static AtomConverter |
CLASS_CONVERTER
A converter to instances of Class . |
static AtomConverter |
DOUBLE_CONVERTER
A converter to instances of Double . |
static AtomConverter |
FLOAT_CONVERTER
A converter to instances of Float . |
static AtomConverter |
INTEGER_CONVERTER
A converter to instances of Integer . |
static AtomConverter |
LOCALE_CONVERTER
A converter to instances of Locale . |
static AtomConverter |
LONG_CONVERTER
A converter to instances of Long . |
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 | |
---|---|
AtomConverter(IStringToObjectConverter stringConverter)
|
Method Summary | |
---|---|
protected java.lang.Object |
_literalToObject(java.lang.String s,
java.util.ResourceBundle bundle,
INoReturnMap argMap,
java.lang.String globalName)
Use the string converter to convert s . |
java.lang.String |
name()
Use the string to object converter's simple class name to derive a name for this converter. |
Methods inherited from class com.taco.text.InterpolatingConverter |
---|
_argMapReferenceToObject, _getStandardImports, _getStandardStaticImports, _literalResultToObject, _scriptSnippetToObject, _toObject, _toObjectMapper, clone, 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 |
---|
protected final IStringToObjectConverter _stringConverter
literalToObject()
uses.
public static final AtomConverter BOOLEAN_CONVERTER
Boolean
.
public static final AtomConverter CHARACTER_CONVERTER
Character
.
public static final AtomConverter INTEGER_CONVERTER
Integer
.
public static final AtomConverter LONG_CONVERTER
Long
.
public static final AtomConverter FLOAT_CONVERTER
Float
.
public static final AtomConverter DOUBLE_CONVERTER
Double
.
public static final AtomConverter CLASS_CONVERTER
Class
.
public static final AtomConverter LOCALE_CONVERTER
Locale
.
Constructor Detail |
---|
public AtomConverter(IStringToObjectConverter stringConverter)
Method Detail |
---|
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
s
. If that fails,
and s
is a braced string, treat is as a script and
return the result of evaluating the script.
_literalToObject
in class InterpolatingConverter
java.text.ParseException
java.util.MissingResourceException
public java.lang.String name()
"StringTo"
, discard it. Also discard the trailing
"Converter"
suffix if present.
name
in interface IInterpolatingConverter
name
in class InterpolatingConverter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |