htmlcompiler.pojos.compile.CompilerConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of htmlcompiler Show documentation
Show all versions of htmlcompiler Show documentation
An HTML compiler, with maven plugin
The newest version!
package htmlcompiler.pojos.compile;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.io.Reader;
import java.lang.reflect.Type;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import static htmlcompiler.utils.Json.GSON;
import static htmlcompiler.utils.Strings.isNullOrBlank;
import static java.nio.file.Files.isRegularFile;
import static java.nio.file.Files.newBufferedReader;
public final class CompilerConfig {
public final Set ignoreTags;
public final Set ignoreAttributes;
public final Set ignoreInputTypes;
public final Map checks;
public final boolean ignoreMajorVersions;
public final ValidatorConfig validator;
public CompilerConfig() {
this(new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashMap<>(), false, new ValidatorConfig());
}
public CompilerConfig(final Set ignoreTags, final Set ignoreAttributes,
final Set ignoreInputTypes, final Map checks,
final boolean ignoreMajorVersions, final ValidatorConfig validator) {
this.ignoreTags = ignoreTags;
this.ignoreAttributes = ignoreAttributes;
this.ignoreInputTypes = ignoreInputTypes;
this.checks = checks;
this.ignoreMajorVersions = ignoreMajorVersions;
this.validator = validator;
}
private static final Type CONFIG_MAP_TYPE = new TypeToken