/** * Creates a new Spoon Java compiler in order to process and compile Java * source code. * * @param factory * the factory this compiler works on */ public SpoonModelBuilder createCompiler(Factory factory) { SpoonModelBuilder comp = new JDTBasedSpoonCompiler(factory); Environment env = getEnvironment(); // building comp.setBinaryOutputDirectory(jsapActualArgs.getFile("destination")); // backward compatibility // we don't have to set the source classpath if (jsapActualArgs.contains("source-classpath")) { comp.setSourceClasspath(jsapActualArgs.getString("source-classpath").split(System.getProperty("path.separator"))); } env.debugMessage("destination: " + comp.getBinaryOutputDirectory()); env.debugMessage("source classpath: " + Arrays.toString(comp.getSourceClasspath())); env.debugMessage("template classpath: " + Arrays.toString(comp.getTemplateClasspath())); return comp; }