org.simpleflatmapper.reflect.Getter 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.
The newest version!
package org.simpleflatmapper.reflect;
import org.simpleflatmapper.reflect.getter.FieldGetter;
import org.simpleflatmapper.reflect.getter.MethodGetter;
/**
* Interface representing a Getter of a property of type P on a object of type T.
*
* use {@link ObjectGetterFactory} to instantiate.
* @see ObjectGetterFactory
* @see MethodGetter
* @see FieldGetter
* @param the targeted type
* @param the property type
*/
public interface Getter {
/**
* Return the property from the specified object.
* @param target the object to get the property from
* @return the property
* @throws Exception if anything goes wrong
*/
P get(T target) throws Exception;
}