log.debug("Using classpath: " + sysClassPath + sep + classpath); javaCompiler.setClassPath(cpath); javaCompiler.setDebug(options.getClassDebugInfo()); javaCompiler.setExtdirs(exts); javaCompiler.setTargetVM(options.getCompilerTargetVM()); javaCompiler.setSourceVM(options.getCompilerSourceVM()); javaCompiler.compile(ctxt.getFullClassName(), pageNodes); javaCompiler.doJavaFile(ctxt.keepGenerated()); javaCompiler.getClassLastModified()); javaCompiler.saveClassFile(ctxt.getFullClassName(), ctxt.getClassFileName());
public Compiler(JspCompilationContext ctxt, JspServletWrapper jsw) { this.jsw = jsw; this.ctxt = ctxt; this.jspcMode = false; this.options = ctxt.getOptions(); this.log = Logger.getLogger(Compiler.class.getName()); this.smapUtil = new SmapUtil(ctxt); this.errDispatcher = new ErrorDispatcher(jspcMode); this.javaCompiler = new NullJavaCompiler(); javaCompiler.init(ctxt, errDispatcher, jspcMode); this.javaCompilerOptionsSet = false; }
log.fine("Using classpath: " + sysClassPath + sep + classpath); javaCompiler.setClassPath(cpath); javaCompiler.setDebug(options.getClassDebugInfo()); javaCompiler.setExtdirs(exts); javaCompiler.setTargetVM(options.getCompilerTargetVM()); javaCompiler.setSourceVM(options.getCompilerSourceVM());
javaCompiler.compile(ctxt.getFullClassName(), pageNodes); javaCompiler.doJavaFile(true); javaCompiler.doJavaFile(ctxt.keepGenerated()); javaCompiler.getClassLastModified()); javaCompiler.saveClassFile(ctxt.getFullClassName(), ctxt.getClassFileName());
Writer javaWriter = javaCompiler.getJavaWriter( javaFileName, ctxt.getOptions().getJavaEncoding()); javaCompiler.doJavaFile(false); throw e; } finally {
javaCompiler.doJavaFile(ctxt.keepGenerated()); tfp.removeProtoTypeFiles(null); javaCompiler.release();
/** * Compile the templates from file names, relative to the templates directory. * * @param templateFiles as not null <b>relative template files</b>, to be looked up in the templates directory * * @throws IOException when reading/writing the files fails */ public void compile(List<File> templateFiles) throws IOException { List<File> javaFiles; File javaFile; javaFiles = new ArrayList<>(); // translate all templates to Java for (File templateFile : templateFiles) { javaFile = translateTemplateToJava( templateFile ); javaFiles.add( javaFile ); } javac.compile( javaFiles ); if ( !compilationContext.shouldKeepGenerated() ) { // clean the generated files for(File file : javaFiles ) { file.delete(); } } }
javaCompiler.doJavaFile(ctxt.keepGenerated());
log.fine("Using classpath: " + sysClassPath + sep + classpath); javaCompiler.setClassPath(cpath); javaCompiler.setDebug(options.getClassDebugInfo()); javaCompiler.setExtdirs(exts); javaCompiler.setTargetVM(options.getCompilerTargetVM()); javaCompiler.setSourceVM(options.getCompilerSourceVM());
javaCompiler.compile(ctxt.getFullClassName(), pageNodes); javaCompiler.doJavaFile(true); javaCompiler.doJavaFile(ctxt.keepGenerated()); javaCompiler.getClassLastModified()); javaCompiler.saveClassFile(ctxt.getFullClassName(), ctxt.getClassFileName());
Writer javaWriter = javaCompiler.getJavaWriter( javaFileName, ctxt.getOptions().getJavaEncoding()); javaCompiler.doJavaFile(false); throw e; } finally {
javaCompiler.doJavaFile(ctxt.keepGenerated()); tfp.removeProtoTypeFiles(null); javaCompiler.release();
javaCompiler.doJavaFile(ctxt.keepGenerated());
log.fine("Using classpath: " + sysClassPath + sep + classpath); javaCompiler.setClassPath(cpath); javaCompiler.setDebug(options.getClassDebugInfo()); javaCompiler.setExtdirs(exts); javaCompiler.setTargetVM(options.getCompilerTargetVM()); javaCompiler.setSourceVM(options.getCompilerSourceVM());
javaCompiler.compile(ctxt.getFullClassName(), pageNodes); javaCompiler.doJavaFile(true); javaCompiler.doJavaFile(ctxt.keepGenerated()); javaCompiler.getClassLastModified()); javaCompiler.saveClassFile(ctxt.getFullClassName(), ctxt.getClassFileName());
Writer javaWriter = javaCompiler.getJavaWriter( javaFileName, ctxt.getOptions().getJavaEncoding()); javaCompiler.doJavaFile(false); throw e; } finally {
javaCompiler.doJavaFile(ctxt.keepGenerated()); tfp.removeProtoTypeFiles(null); javaCompiler.release();
public Compiler(JspCompilationContext ctxt, JspServletWrapper jsw) { this.jsw = jsw; this.ctxt = ctxt; this.jspcMode = false; this.options = ctxt.getOptions(); this.log = Logger.getLogger(Compiler.class.getName()); this.smapUtil = new SmapUtil(ctxt); this.errDispatcher = new ErrorDispatcher(jspcMode); this.javaCompiler = new NullJavaCompiler(); javaCompiler.init(ctxt, errDispatcher, jspcMode); this.javaCompilerOptionsSet = false; }
log.fine("Using classpath: " + sysClassPath + sep + classpath); javaCompiler.setClassPath(cpath); javaCompiler.setDebug(options.getClassDebugInfo()); javaCompiler.setExtdirs(exts); javaCompiler.setTargetVM(options.getCompilerTargetVM()); javaCompiler.setSourceVM(options.getCompilerSourceVM());
javaCompiler.compile(ctxt.getFullClassName(), pageNodes); javaCompiler.doJavaFile(true); javaCompiler.doJavaFile(ctxt.keepGenerated()); javaCompiler.getClassLastModified()); javaCompiler.saveClassFile(ctxt.getFullClassName(), ctxt.getClassFileName());