![JAR search and dependency download from the Maven repository](/logo.png)
org.sfm.csv.impl.ParsingContextFactory 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.csv.impl;
import org.sfm.map.ParsingContextProvider;
public class ParsingContextFactory {
private static final ParsingContext NULL_PARSING_CONTEXT = new ParsingContext(null);
private final ParsingContextProvider[] providers;
public ParsingContextFactory(ParsingContextProvider[] providers) {
this.providers = providers;
}
public ParsingContext newContext() {
if (providers != null) {
Object[] context = new Object[providers.length];
for (int i = 0; i < providers.length; i++) {
ParsingContextProvider provider = providers[i];
if (provider != null) {
context[i] = provider.newContext();
}
}
return new ParsingContext(context);
} else {
return NULL_PARSING_CONTEXT;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy