org.simpleflatmapper.converter.ContextualConverterFactoryAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-converter Show documentation
Show all versions of sfm-converter Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
The newest version!
package org.simpleflatmapper.converter;
import java.lang.reflect.Type;
public class ContextualConverterFactoryAdapter implements ContextualConverterFactory {
private final ConverterFactory converterFactory;
public ContextualConverterFactoryAdapter(ConverterFactory converterFactory) {
this.converterFactory = converterFactory;
}
@Override
public ContextualConverter super I, ? extends O> newConverter(ConvertingTypes targetedTypes, ContextFactoryBuilder contextFactoryBuilder, Object... params) {
return new ContextualConverterAdapter(converterFactory.newConverter(targetedTypes, params));
}
@Override
public ConvertingScore score(ConvertingTypes targetedTypes) {
return converterFactory.score(targetedTypes);
}
@Override
public Type getFromType() {
return converterFactory.getFromType();
}
}