org.simpleflatmapper.map.getter.ContextualGetterFactoryAdapter 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.context.MappingContextFactoryBuilder;
import org.simpleflatmapper.reflect.Getter;
import org.simpleflatmapper.reflect.getter.GetterFactory;
import java.lang.reflect.Type;
public class ContextualGetterFactoryAdapter implements ContextualGetterFactory {
private final GetterFactory delegate;
public ContextualGetterFactoryAdapter(GetterFactory delegate) {
this.delegate = delegate;
}
@Override
public ContextualGetter newGetter(Type target, K key, MappingContextFactoryBuilder, K> mappingContextFactoryBuilder, Object... properties) {
Getter getter = delegate.newGetter(target, key, properties);
if (getter == null) return null;
return ContextualGetterAdapter.of(getter);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy