Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.deps |
Analyzes information about dependencies between files.
|
Modifier and Type | Class and Description |
---|---|
class |
CompilerInput
A class for the internal representation of an input to the compiler.
|
class |
JSModule
A JavaScript module has a unique name, consists of a list of compiler inputs,
and can depend on other modules.
|
Modifier and Type | Class and Description |
---|---|
class |
ClosureSortedDependencies<INPUT extends DependencyInfo>
A sorted list of inputs with dependency information.
|
class |
Es6SortedDependencies<INPUT extends DependencyInfo>
A sorted list of inputs following the ES6 module ordering spec.
|
interface |
SortedDependencies<INPUT extends DependencyInfo>
A sorted list of inputs with dependency information.
|
Modifier and Type | Class and Description |
---|---|
static class |
DependencyInfo.Base
Abstract base implementation that defines derived accessors such
as
DependencyInfo.Base.isModule() . |
class |
SimpleDependencyInfo
A class to hold JS dependency information for a single .js file.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,DependencyInfo> |
DependencyFile.dependencies
Map of name spaces to their dependency info.
|
private java.util.List<DependencyInfo> |
DepsFileParser.depInfos
The dependency information extracted from the current file.
|
Modifier and Type | Method and Description |
---|---|
private DependencyInfo |
DefaultDependencyResolver.getDependencyInfo(java.lang.String symbol)
Looks at each of the dependency files for dependency information.
|
DependencyInfo |
DependencyFile.getDependencyInfo(java.lang.String symbol)
Gets the dependency info for the provided symbol, if contained in this
dependency file.
|
DependencyInfo |
JsFileParser.parseFile(java.lang.String filePath,
java.lang.String closureRelativePath,
java.lang.String fileContents)
Parses the given file and returns the dependency information that it
contained.
|
private DependencyInfo |
JsFileParser.parseReader(java.lang.String filePath,
java.lang.String closureRelativePath,
java.io.Reader fileContents) |
Modifier and Type | Method and Description |
---|---|
private java.util.Map<java.lang.String,DependencyInfo> |
DepsGenerator.parseDepsFiles()
Parses all deps.js files in the deps list and creates a map of
closure-relative path -> DependencyInfo.
|
java.util.List<DependencyInfo> |
DepsFileParser.parseFile(java.lang.String filePath)
Parses the given file and returns a list of dependency information that it
contained.
|
java.util.List<DependencyInfo> |
DepsFileParser.parseFile(java.lang.String filePath,
java.lang.String fileContents)
Parses the given file and returns a list of dependency information that it
contained.
|
java.util.List<DependencyInfo> |
DepsFileParser.parseFileReader(java.lang.String filePath,
java.io.Reader reader)
Parses the file from the given reader and returns a list of
dependency information that it contained.
|
private java.util.Map<java.lang.String,DependencyInfo> |
DepsGenerator.parseSources(java.util.Set<java.lang.String> preparsedFiles)
Parses all source files for dependency information.
|
Modifier and Type | Method and Description |
---|---|
static void |
ClosureBundler.appendInput(java.lang.Appendable out,
DependencyInfo info,
java.lang.String contents)
Append the contents of the string to the supplied appendable.
|
void |
ClosureBundler.appendTo(java.lang.Appendable out,
DependencyInfo info,
com.google.common.io.CharSource content)
Append the contents of the CharSource to the supplied appendable.
|
void |
ClosureBundler.appendTo(java.lang.Appendable out,
DependencyInfo info,
File content,
java.nio.charset.Charset contentCharset)
Append the contents of the file to the supplied appendable.
|
void |
ClosureBundler.appendTo(java.lang.Appendable out,
DependencyInfo info,
java.lang.String content)
Append the contents of the string to the supplied appendable.
|
private void |
DepsGenerator.reportDuplicateProvide(java.lang.String namespace,
DependencyInfo firstDep,
DependencyInfo secondDep) |
private void |
DepsGenerator.reportDuplicateRequire(java.lang.String namespace,
DependencyInfo depInfo) |
private void |
DepsGenerator.reportSameFile(java.lang.String namespace,
DependencyInfo depInfo) |
private void |
DepsGenerator.reportUndefinedNamespace(java.lang.String namespace,
DependencyInfo depInfo) |
Modifier and Type | Method and Description |
---|---|
private void |
DepsGenerator.addToProvideMap(java.lang.Iterable<DependencyInfo> depInfos,
java.util.Map<java.lang.String,DependencyInfo> providesMap)
Adds the given DependencyInfos to the given providesMap.
|
private void |
DepsGenerator.addToProvideMap(java.lang.Iterable<DependencyInfo> depInfos,
java.util.Map<java.lang.String,DependencyInfo> providesMap)
Adds the given DependencyInfos to the given providesMap.
|
protected void |
DepsGenerator.cleanUpDuplicatedFiles(java.util.Map<java.lang.String,DependencyInfo> depsFiles,
java.util.Map<java.lang.String,DependencyInfo> jsFiles)
Removes duplicated depsInfo from jsFiles if this info already present in
some of the parsed deps.js
|
protected void |
DepsGenerator.cleanUpDuplicatedFiles(java.util.Map<java.lang.String,DependencyInfo> depsFiles,
java.util.Map<java.lang.String,DependencyInfo> jsFiles)
Removes duplicated depsInfo from jsFiles if this info already present in
some of the parsed deps.js
|
private void |
DepsGenerator.validateDependencies(java.lang.Iterable<DependencyInfo> preparsedFileDepedencies,
java.lang.Iterable<DependencyInfo> parsedFileDependencies)
Reports if there are any dependency problems with the given dependency
information.
|
private void |
DepsGenerator.validateDependencies(java.lang.Iterable<DependencyInfo> preparsedFileDepedencies,
java.lang.Iterable<DependencyInfo> parsedFileDependencies)
Reports if there are any dependency problems with the given dependency
information.
|
private void |
DepsGenerator.writeDepInfos(java.io.PrintStream out,
java.util.Collection<DependencyInfo> depInfos)
Writes goog.addDependency() lines for each DependencyInfo in depInfos.
|
private void |
DepsGenerator.writeDepsContent(java.util.Map<java.lang.String,DependencyInfo> depsFiles,
java.util.Map<java.lang.String,DependencyInfo> jsFiles,
java.io.PrintStream out)
Creates the content to put into the output deps.js file.
|
private void |
DepsGenerator.writeDepsContent(java.util.Map<java.lang.String,DependencyInfo> depsFiles,
java.util.Map<java.lang.String,DependencyInfo> jsFiles,
java.io.PrintStream out)
Creates the content to put into the output deps.js file.
|