public NominMapper parseDirectory(File directory, Charset charset) { if (directory.exists() && directory.isDirectory()) for (File mappingScript : directory.listFiles( new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".groovy"); } })) parse(scriptLoader.loadFile(mappingScript, charset)); else throw new NominException(format("Directory {0} does not exist!", directory)); return this; }
public NominMapper parseFiles(Charset charset, File... mappingScripts) { for (File mappingScript : mappingScripts) parse(scriptLoader.loadFile(mappingScript, charset)); return this; }
public NominMapper parseFiles(String... mappingScripts) { for (String mappingScript : mappingScripts) parse(scriptLoader.loadFile(new File(mappingScript), Charset.defaultCharset())); return this; }