com.thoughtworks.xstream.converters.SingleValueConverterWrapper Java Examples

The following examples show how to use com.thoughtworks.xstream.converters.SingleValueConverterWrapper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Serializer.java    From jease with GNU General Public License v3.0 5 votes vote down vote up
public Serializer() {
	xstream = new XStream();
	xstream.registerConverter(new BlobConverter());
	nodeConverter = new SingleValueConverterWrapper(new NodeConverter());
	nodeArrayConverter = new DelegateArrayConverter(nodeConverter,
			xstream.getMapper());
}
 
Example #2
Source File: XStream.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void registerConverter(SingleValueConverter converter, int priority) {
    if (converterRegistry != null) {
        converterRegistry.registerConverter(
            new SingleValueConverterWrapper(converter), priority);
    }
}
 
Example #3
Source File: XStream.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Register a local {@link SingleValueConverter} for a field.
 *
 * @param definedIn the class type the field is defined in
 * @param fieldName the field name
 * @param converter the converter to use
 * @since 1.3
 */
public void registerLocalConverter(Class definedIn, String fieldName,
    SingleValueConverter converter) {
    registerLocalConverter(
        definedIn, fieldName, (Converter)new SingleValueConverterWrapper(converter));
}