org.simpleflatmapper.reflect.instantiator.GetterBiInstantiator Maven / Gradle / Ivy
package org.simpleflatmapper.reflect.instantiator;
import org.simpleflatmapper.reflect.BiInstantiator;
import org.simpleflatmapper.reflect.Getter;
import org.simpleflatmapper.reflect.Instantiator;
public class GetterBiInstantiator implements BiInstantiator {
private final Getter getter;
public GetterBiInstantiator(Getter getter) {
this.getter = getter;
}
@Override
public T newInstance(S1 s1, S2 s2) throws Exception {
return getter.get(s1);
}
}