本文整理了Java中com.google.javascript.jscomp.Compiler.initModules()
方法的一些代码示例,展示了Compiler.initModules()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Compiler.initModules()
方法的具体详情如下:
包路径:com.google.javascript.jscomp.Compiler
类名称:Compiler
方法名:initModules
[英]Initializes the instance state needed for a compile job if the sources are in modules.
[中]如果源位于模块中,则初始化编译作业所需的实例状态。
代码示例来源:origin: org.scala-js/closure-compiler-java-6
/**
* Initializes the instance state needed for a compile job.
*/
public <T1 extends SourceFile, T2 extends SourceFile> void init(
List<T1> externs,
List<T2> inputs,
CompilerOptions options) {
JSModule module = new JSModule(SINGLETON_MODULE_NAME);
for (SourceFile input : inputs) {
module.add(input);
}
List<JSModule> modules = new ArrayList<JSModule>(1);
modules.add(module);
initModules(externs, modules, options);
}
代码示例来源:origin: com.google.javascript/closure-compiler
/** Initializes the instance state needed for a compile job. */
public final <T1 extends SourceFile, T2 extends SourceFile> void init(
List<T1> externs, List<T2> sources, CompilerOptions options) {
JSModule module = new JSModule(JSModule.STRONG_MODULE_NAME);
for (SourceFile source : sources) {
module.add(new CompilerInput(source));
}
List<JSModule> modules = new ArrayList<>(1);
modules.add(module);
initModules(externs, modules, options);
addFilesToSourceMap(sources);
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
/**
* Compiles a list of modules.
*/
public <T extends SourceFile> Result compileModules(List<T> externs,
List<JSModule> modules, CompilerOptions options) {
// The compile method should only be called once.
Preconditions.checkState(jsRoot == null);
try {
initModules(externs, modules, options);
if (hasErrors()) {
return getResult();
}
return compile();
} finally {
Tracer t = newTracer("generateReport");
errorManager.generateReport();
stopTracer(t, "generateReport");
}
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
compiler.initModules(externs, modules, options);
compiler.orderInputsWithLargeStack();
} else {
代码示例来源:origin: com.google.javascript/closure-compiler
compiler.initModules(externs, modules, options);
} else {
compiler.init(externs, inputs, options);
代码示例来源:origin: com.google.javascript/closure-compiler
initModules(externs, modules, options);
if (options.printConfig) {
printConfig(System.err);
内容来源于网络,如有侵权,请联系作者删除!