1 24 25 package org.aspectj.compiler.base; 26 import org.aspectj.compiler.base.ast.*; 27 28 import org.aspectj.tools.ide.SymbolManager; 29 30 import java.util.*; 31 import java.io.*; 32 33 public class RunJavacPass extends AbstractCompilerPass { 34 35 public RunJavacPass(JavaCompiler compiler) { 36 super(compiler); 37 } 38 39 public String getDisplayName() { 40 return "running javac on generated sources"; 41 } 42 43 public List getFilesToCompile() { 44 return getCompiler().getFilesToCompile(); 45 } 46 47 public void transformWorld() { 48 File outputDir = getOptions().workingDir; 49 50 if (!getOptions().preprocess) { 51 getCompiler().beginSection("running javac"); 53 54 if (!compile(getOptions().outputDir, outputDir, 55 (File[])getFilesToCompile().toArray(new File[0]))) 56 { 57 getCompiler().showError(null, "error in javac"); 58 } 59 } 60 } 61 62 63 public boolean compile(File inputdir, File outputdir, File[] files) { 65 if (files.length == 0) { 66 System.err.println("Nothing for javac to compile."); 67 return false; 68 } 69 70 return new JavaCWrapper(getCompiler()).compile(inputdir, outputdir, files); 71 } 72 } 73 | Popular Tags |