
org.sfm.reflect.ConstructorOnGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleFlatMapper Show documentation
Show all versions of simpleFlatMapper Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.sfm.reflect;
import java.lang.reflect.Constructor;
public class ConstructorOnGetter implements Getter {
private final Constructor constructor;
private final Getter getter;
public ConstructorOnGetter(Constructor constructor, Getter getter) {
super();
this.constructor = constructor;
this.getter = getter;
}
@Override
public P get(T target) throws Exception {
return constructor.newInstance(getter.get(target));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy