Back to project page colibri.
The source code is released under:
Apache License
If you think the Android project colibri listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package labrom.colibri.xml; /*w w w . ja v a 2 s .c om*/ /** * This interface is used whenever a String value needs to be transformed into * another type. * * You can provide {@link ElementContext} with an implementation of this * interface when string values extracted from XML need to be converted to a * type that Pulloid cannot convert to automatically. * * StringTransformer is used in these two methods: * {@link ElementContext#createField(String, Class, StringTransformer)}, {@link ElementContext#createFieldOnAttribute(String, String, Class, StringTransformer)}. * In both cases a StringTransformer will be used to get the final value that * will populate the target field. * * @author Romain Laboisse labrom@gmail.com * * @param <T> * The type of the transformed value. * * @see ElementContext */ public interface StringTransformer<T> { T transform(String value); }