![JAR search and dependency download from the Maven repository](/logo.png)
org.simpleflatmapper.map.getter.ContextualGetterBiInstantiator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-map Show documentation
Show all versions of sfm-map Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.map.getter;
import org.simpleflatmapper.map.MappingContext;
import org.simpleflatmapper.reflect.BiInstantiator;
import static org.simpleflatmapper.util.Asserts.requireNonNull;
public class ContextualGetterBiInstantiator implements BiInstantiator, T> {
private final ContextualGetter super S, ? extends T> fieldMapperGetter;
public ContextualGetterBiInstantiator(ContextualGetter super S, ? extends T> fieldMapperGetter) {
this.fieldMapperGetter = requireNonNull("fieldMapperGetter", fieldMapperGetter);
}
@Override
public T newInstance(S s, MappingContext> mappingContext) throws Exception {
return fieldMapperGetter.get(s, mappingContext);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy