All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.juffrou.xml.serializer.StringSerializer Maven / Gradle / Ivy

There is a newer version: 2.1.9
Show newest version
package net.sf.juffrou.xml.serializer;

import net.sf.juffrou.reflect.JuffrouBeanWrapper;
import net.sf.juffrou.xml.internal.io.JuffrouReader;
import net.sf.juffrou.xml.internal.io.JuffrouWriter;

public class StringSerializer implements Serializer {

	@Override
	public void serialize(JuffrouWriter writer, JuffrouBeanWrapper valueOwner, String valuePropertyName) {
		writer.write(valueOwner.getValue(valuePropertyName).toString());
	}

	@Override
	public void deserialize(JuffrouReader reader, JuffrouBeanWrapper valueOwner, String valuePropertyName) {
		valueOwner.setValue(valuePropertyName, reader.getText());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy