|
||||||||||
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.CompositeConverter
com.taco.text.BracedPropertyCompositeConverter
com.taco.text.IntArrayConverter
public final class IntArrayConverter
A converter to int arrays. Each array element has a property associated with it, which is assigned in the string or in the resource bundle value.
Nested Class Summary |
---|
Field Summary |
---|
Fields inherited from class com.taco.text.BracedPropertyCompositeConverter |
---|
_KEEP_ENCLOSING_PUNCTUATION_PATTERN |
Fields inherited from class com.taco.text.CompositeConverter |
---|
_DEFAULT_COMPOSITE_CONVERTER_MAP, _DEFAULT_COMPOSITE_CREATION_PROPERTY_NAMES, _SHOULD_READ_GLOBAL_NAME |
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 | |
---|---|
IntArrayConverter(java.util.Collection elementNames)
Create a new instance that uses the argument collection of property names mapped to the subequent array indices, starting from 0. |
|
IntArrayConverter(java.util.Collection elementNames,
IIntMapper intMapper)
Create a new instance that uses the argument collection of property names mapped to the subequent array indices, starting from 0. |
Method Summary | |
---|---|
protected java.lang.Object |
_createComposite(java.util.Map propertyMap,
java.util.ResourceBundle bundle,
INoReturnMap argMap)
Given the property key / value map, return a composite object ready to have its properties set (if legal). |
protected CompositeConverter.ISetPropertyAction |
_getActionForProperty(java.lang.String propertyName)
Return an instance ISetPropertyAction for the argument
property name. |
IInterpolatingConverter |
getConverterForProperty(java.lang.String propertyName,
java.lang.Object composite)
Return AtomConverter.INTEGER_CONVERTER if the
property name is recognized by this instance. |
java.util.Collection |
getPropertyNames()
Return the property names in the name to index map. |
static void |
main(java.lang.String[] args)
A simple test program. |
Methods inherited from class com.taco.text.BracedPropertyCompositeConverter |
---|
_addProperties, _extractPropertiesSubSequence, _extractPropertyValue, _gatherPropertyMatchResults, _literalToObject, _shouldKeepEnclosingPunctuation |
Methods inherited from class com.taco.text.InterpolatingConverter |
---|
_argMapReferenceToObject, _getStandardImports, _getStandardStaticImports, _literalResultToObject, _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 |
Constructor Detail |
---|
public IntArrayConverter(java.util.Collection elementNames)
public IntArrayConverter(java.util.Collection elementNames, IIntMapper intMapper)
Method Detail |
---|
public static void main(java.lang.String[] args)
protected java.lang.Object _createComposite(java.util.Map propertyMap, java.util.ResourceBundle bundle, INoReturnMap argMap)
CompositeConverter
Given the property key / value map, return a composite object ready
to have its properties set (if legal). This method may completely
configure the composite, or it may defer setting some properties to
_setProperties()
. However, properties set here instead of
in _setProperties()
cannot be updated.
This base implementation throws an
UnsupportedOperationException
. This is not abstract so
only _literalToObject()
needs to be implemented to make a
subclass a concrete class that can create an object via the "instance"
property and configure the object afterwards.
_createComposite
in class CompositeConverter
public java.util.Collection getPropertyNames()
getPropertyNames
in class CompositeConverter
public IInterpolatingConverter getConverterForProperty(java.lang.String propertyName, java.lang.Object composite)
AtomConverter.INTEGER_CONVERTER
if the
property name is recognized by this instance.
getConverterForProperty
in class CompositeConverter
protected CompositeConverter.ISetPropertyAction _getActionForProperty(java.lang.String propertyName)
ISetPropertyAction
for the argument
property name. If no action is associated with the property name,
return null
.
_getActionForProperty
in class CompositeConverter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |