
org.sfm.reflect.InstantiatorOnGetter 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;
public class InstantiatorOnGetter implements Getter {
private final Instantiator instantiator;
private final Getter getter;
public InstantiatorOnGetter(Instantiator instantiator, Getter getter) {
super();
this.instantiator = instantiator;
this.getter = getter;
}
@Override
public P get(T target) throws Exception {
return instantiator.newInstance(getter.get(target));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy