本文整理了Java中com.google.javascript.jscomp.Compiler.fillEmptyModules()
方法的一些代码示例,展示了Compiler.fillEmptyModules()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Compiler.fillEmptyModules()
方法的具体详情如下:
包路径:com.google.javascript.jscomp.Compiler
类名称:Compiler
方法名:fillEmptyModules
[英]Fill any empty modules with a place holder file. It makes any cross module motion easier.
[中]用占位符文件填充所有空模块。它使任何跨模块运动更容易。
代码示例来源:origin: org.scala-js/closure-compiler-java-6
private void repartitionInputs() {
fillEmptyModules(modules);
rebuildInputsFromModules();
}
代码示例来源:origin: com.google.javascript/closure-compiler
private void repartitionInputs() {
fillEmptyModules(getModules());
rebuildInputsFromModules();
}
代码示例来源:origin: com.google.javascript/closure-compiler
/**
* Initializes the instance state needed for a compile job if the sources
* are in modules.
*/
public <T extends SourceFile> void initModules(
List<T> externs, List<JSModule> modules, CompilerOptions options) {
initOptions(options);
checkFirstModule(modules);
this.externs = makeExternInputs(externs);
// Generate the module graph, and report any errors in the module specification as errors.
try {
this.moduleGraph = new JSModuleGraph(modules);
} catch (JSModuleGraph.ModuleDependenceException e) {
// problems with the module format. Report as an error. The
// message gives all details.
report(JSError.make(MODULE_DEPENDENCY_ERROR,
e.getModule().getName(), e.getDependentModule().getName()));
return;
}
// Creating the module graph can move weak source around, and end up with empty modules.
fillEmptyModules(getModules());
this.commentsPerFile = new ConcurrentHashMap<>(moduleGraph.getInputCount());
initBasedOnOptions();
initInputsByIdMap();
initAST();
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
fillEmptyModules(modules);
代码示例来源:origin: com.google.javascript/closure-compiler
void orderInputs() {
hoistExterns();
// Check if the sources need to be re-ordered.
boolean staleInputs = false;
if (options.getDependencyOptions().needsManagement()) {
for (CompilerInput input : moduleGraph.getAllInputs()) {
// Forward-declare all the provided types, so that they
// are not flagged even if they are dropped from the process.
for (String provide : input.getProvides()) {
forwardDeclareType(provide);
}
}
try {
moduleGraph.manageDependencies(options.getDependencyOptions());
staleInputs = true;
} catch (MissingProvideException e) {
report(JSError.make(
MISSING_ENTRY_ERROR, e.getMessage()));
} catch (JSModuleGraph.MissingModuleException e) {
report(JSError.make(
MISSING_MODULE_ERROR, e.getMessage()));
}
}
// Manage dependencies may move weak sources around, and end up with empty modules.
fillEmptyModules(getModules());
hoistNoCompileFiles();
if (staleInputs) {
repartitionInputs();
}
}
内容来源于网络,如有侵权,请联系作者删除!