org.simpleflatmapper.reflect.Setter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-reflect Show documentation
Show all versions of sfm-reflect Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.reflect;
import org.simpleflatmapper.reflect.getter.FieldSetter;
import org.simpleflatmapper.reflect.setter.MethodSetter;
/**
* Represent a setter of a property of type P on a object of type T.
*
* use {@link ObjectSetterFactory} to instantiate.
*
* @see ObjectSetterFactory
* @see FieldSetter
* @see MethodSetter
* @param the target type
* @param the property type
*/
public interface Setter {
/**
* Set the properties on the target object to value.
* @param target the target to set the value on
* @param value the value to set
* @throws Exception if anything goes wrong
*/
void set(T target, P value) throws Exception;
}