Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.ant | |
com.google.javascript.jscomp.deps |
Analyzes information about dependencies between files.
|
com.google.javascript.jscomp.testing | |
com.google.javascript.refactoring |
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SourceFile.AtUrl
A source file at a URL where the code is only read into memory if absolutely
necessary.
|
(package private) static class |
SourceFile.Generated
A source file where the code will be dynamically generated
from the injected interface.
|
(package private) static class |
SourceFile.OnDisk
A source file where the code is only read into memory if absolutely
necessary.
|
(package private) static class |
SourceFile.Preloaded
A source file where the code has been preloaded.
|
Modifier and Type | Field and Description |
---|---|
private SourceFile |
JsAst.sourceFile |
private SourceFile |
SyntheticAst.sourceFile |
private SourceFile |
SourceMapInput.sourceFile |
Modifier and Type | Field and Description |
---|---|
private com.google.common.base.Supplier<java.util.List<SourceFile>> |
AbstractCommandLineRunner.externsSupplierForTesting |
private com.google.common.base.Supplier<java.util.List<SourceFile>> |
AbstractCommandLineRunner.inputsSupplierForTesting |
private com.google.common.base.Function<java.lang.String,SourceFile> |
Compiler.originalSourcesLoader |
private java.util.concurrent.ConcurrentHashMap<java.lang.String,SourceFile> |
Compiler.sourceMapOriginalSources |
Modifier and Type | Method and Description |
---|---|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.compile(java.util.List<T1> externs,
java.util.List<T2> inputs,
CompilerOptions options)
Compiles a list of inputs.
|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.compile(java.util.List<T1> externs,
java.util.List<T2> inputs,
CompilerOptions options)
Compiles a list of inputs.
|
<T extends SourceFile> |
Compiler.compileModules(java.util.List<T> externs,
java.util.List<JSModule> modules,
CompilerOptions options)
Compiles a list of modules.
|
<T extends SourceFile> |
JsMessageExtractor.extractMessages(java.lang.Iterable<T> inputs)
Extracts JS messages from JavaScript code.
|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.init(java.util.List<T1> externs,
java.util.List<T2> inputs,
CompilerOptions options)
Initializes the instance state needed for a compile job.
|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.init(java.util.List<T1> externs,
java.util.List<T2> inputs,
CompilerOptions options)
Initializes the instance state needed for a compile job.
|
<T extends SourceFile> |
Compiler.initModules(java.util.List<T> externs,
java.util.List<JSModule> modules,
CompilerOptions options)
Initializes the instance state needed for a compile job if the sources
are in modules.
|
private <T extends SourceFile> |
Compiler.makeCompilerInput(java.util.List<T> files,
boolean isExtern) |
Modifier and Type | Method and Description |
---|---|
SourceFile |
SourceFile.Builder.buildFromCode(java.lang.String fileName,
java.lang.String code) |
SourceFile |
SourceFile.Builder.buildFromFile(File file) |
SourceFile |
SourceFile.Builder.buildFromFile(java.lang.String fileName) |
SourceFile |
SourceFile.Builder.buildFromGenerator(java.lang.String fileName,
SourceFile.Generator generator) |
SourceFile |
SourceFile.Builder.buildFromInputStream(java.lang.String fileName,
java.io.InputStream s) |
SourceFile |
SourceFile.Builder.buildFromReader(java.lang.String fileName,
java.io.Reader r) |
SourceFile |
SourceFile.Builder.buildFromUrl(java.net.URL url) |
static SourceFile |
SourceFile.fromCode(java.lang.String fileName,
java.lang.String code) |
static SourceFile |
SourceFile.fromFile(File file) |
static SourceFile |
SourceFile.fromFile(File file,
java.nio.charset.Charset c) |
static SourceFile |
SourceFile.fromFile(java.lang.String fileName) |
static SourceFile |
SourceFile.fromFile(java.lang.String fileName,
java.nio.charset.Charset c) |
static SourceFile |
SourceFile.fromGenerator(java.lang.String fileName,
SourceFile.Generator generator) |
static SourceFile |
SourceFile.fromInputStream(java.lang.String fileName,
java.io.InputStream s)
Deprecated.
|
static SourceFile |
SourceFile.fromInputStream(java.lang.String fileName,
java.io.InputStream s,
java.nio.charset.Charset charset) |
static SourceFile |
SourceFile.fromReader(java.lang.String fileName,
java.io.Reader r) |
SourceFile |
CompilerInput.getSourceFile() |
SourceFile |
SourceAst.getSourceFile()
Returns the source file the generated AST represents.
|
SourceFile |
JsAst.getSourceFile() |
SourceFile |
SyntheticAst.getSourceFile() |
(package private) abstract SourceFile |
AbstractCompiler.getSourceFileByName(java.lang.String sourceName)
Looks up a source file by name.
|
(package private) SourceFile |
Compiler.getSourceFileByName(java.lang.String sourceName) |
Modifier and Type | Method and Description |
---|---|
private java.util.List<SourceFile> |
AbstractCommandLineRunner.createExternInputs(java.util.List<java.lang.String> files)
Creates JS extern inputs from a list of files.
|
protected java.util.List<SourceFile> |
CommandLineRunner.createExterns(CompilerOptions options) |
protected java.util.List<SourceFile> |
AbstractCommandLineRunner.createExterns(CompilerOptions options) |
protected java.util.List<SourceFile> |
AbstractCommandLineRunner.createInputs(java.util.List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
boolean allowStdIn,
java.util.List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Creates inputs from a list of files.
|
protected java.util.List<SourceFile> |
AbstractCommandLineRunner.createInputs(java.util.List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
java.util.List<AbstractCommandLineRunner.JsonFileSpec> jsonFiles,
boolean allowStdIn,
java.util.List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Creates inputs from a list of source files, zips and json files.
|
protected java.util.List<SourceFile> |
AbstractCommandLineRunner.createInputs(java.util.List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
java.util.List<AbstractCommandLineRunner.JsonFileSpec> jsonFiles,
java.util.List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Creates inputs from a list of source files and json files.
|
private java.util.List<SourceFile> |
AbstractCommandLineRunner.createSourceInputs(java.util.List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs,
java.util.List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
java.util.List<AbstractCommandLineRunner.JsonFileSpec> jsonFiles)
Creates JS source code inputs from a list of files.
|
static java.util.List<SourceFile> |
SourceFile.fromZipFile(java.lang.String zipName,
java.nio.charset.Charset inputCharset) |
static java.util.List<SourceFile> |
AbstractCommandLineRunner.getBuiltinExterns(CompilerOptions.Environment env) |
static java.util.List<SourceFile> |
CommandLineRunner.getDefaultExterns()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
JSModule.add(SourceFile file)
Adds a source file input to this module.
|
Result |
Compiler.compile(SourceFile extern,
SourceFile input,
CompilerOptions options) |
java.util.Collection<JsMessage> |
JsMessageExtractor.extractMessages(SourceFile... inputs)
Extracts JS messages from JavaScript code.
|
(package private) static void |
Linter.fix(SourceFile externs,
java.lang.String filename) |
private static void |
Linter.lint(SourceFile externs,
Path path,
boolean fix) |
(package private) static void |
Linter.lint(SourceFile externs,
java.lang.String filename) |
Node |
Compiler.parse(SourceFile file) |
void |
CompilerInput.setSourceFile(SourceFile file) |
void |
SourceAst.setSourceFile(SourceFile file)
Sets the source file the generated AST represents.
|
void |
JsAst.setSourceFile(SourceFile file) |
void |
SyntheticAst.setSourceFile(SourceFile file) |
Modifier and Type | Method and Description |
---|---|
(package private) java.util.List<JSModule> |
AbstractCommandLineRunner.createJsModules(java.util.List<AbstractCommandLineRunner.JsModuleSpec> specs,
java.util.List<SourceFile> inputs)
Creates module objects from a list of js module specifications.
|
(package private) void |
AbstractCommandLineRunner.enableTestMode(com.google.common.base.Supplier<java.util.List<SourceFile>> externsSupplier,
com.google.common.base.Supplier<java.util.List<SourceFile>> inputsSupplier,
com.google.common.base.Supplier<java.util.List<JSModule>> modulesSupplier,
com.google.common.base.Function<java.lang.Integer,java.lang.Boolean> exitCodeReceiver)
Put the command line runner into test mode.
|
(package private) void |
AbstractCommandLineRunner.enableTestMode(com.google.common.base.Supplier<java.util.List<SourceFile>> externsSupplier,
com.google.common.base.Supplier<java.util.List<SourceFile>> inputsSupplier,
com.google.common.base.Supplier<java.util.List<JSModule>> modulesSupplier,
com.google.common.base.Function<java.lang.Integer,java.lang.Boolean> exitCodeReceiver)
Put the command line runner into test mode.
|
static java.util.List<JSError> |
AbstractCommandLineRunner.removeDuplicateZipEntries(java.util.List<SourceFile> sourceFiles)
Check that relative paths inside zip files are unique, since multiple files
with the same path inside different zips are considered duplicate inputs.
|
(package private) void |
Compiler.setOriginalSourcesLoader(com.google.common.base.Function<java.lang.String,SourceFile> originalSourcesLoader) |
Constructor and Description |
---|
CompilerInput(SourceFile file) |
CompilerInput(SourceFile file,
boolean isExtern) |
JsAst(SourceFile sourceFile) |
SourceMapInput(SourceFile sourceFile) |
Modifier and Type | Method and Description |
---|---|
private java.util.List<SourceFile> |
CompileTask.findExternFiles(CompilerOptions options) |
private java.util.List<SourceFile> |
CompileTask.findJavaScriptFiles(org.apache.tools.ant.types.ResourceCollection rc)
Translates an Ant resource collection into the file list format that
the compiler expects.
|
private java.util.List<SourceFile> |
CompileTask.findSourceFiles() |
private java.util.List<SourceFile> |
CompileTask.getBuiltinExterns(CompilerOptions options)
Gets the default externs set.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<SourceFile> |
DepsGenerator.deps |
private java.util.Collection<SourceFile> |
DepsGenerator.srcs |
Modifier and Type | Method and Description |
---|---|
(package private) static java.util.List<SourceFile> |
DepsGenerator.createSourceFilesFromPaths(java.util.Collection<java.lang.String> paths) |
(package private) static java.util.List<SourceFile> |
DepsGenerator.createSourceFilesFromPaths(java.lang.String... paths) |
(package private) static java.util.List<SourceFile> |
DepsGenerator.createSourceFilesFromZipPaths(java.util.Collection<java.lang.String> paths) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
DepsGenerator.shouldSkipDepsFile(SourceFile file)
Returns whether we should ignore dependency info in the given deps file.
|
Constructor and Description |
---|
DepsGenerator(java.util.Collection<SourceFile> deps,
java.util.Collection<SourceFile> srcs,
DepsGenerator.InclusionStrategy mergeStrategy,
java.lang.String closurePathAbs,
ErrorManager errorManager)
Creates a new DepsGenerator.
|
DepsGenerator(java.util.Collection<SourceFile> deps,
java.util.Collection<SourceFile> srcs,
DepsGenerator.InclusionStrategy mergeStrategy,
java.lang.String closurePathAbs,
ErrorManager errorManager)
Creates a new DepsGenerator.
|
Modifier and Type | Field and Description |
---|---|
private SourceFile |
SimpleSourceExcerptProvider.sourceFile |
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableList.Builder<SourceFile> |
RefactoringDriver.Builder.externs |
private com.google.common.collect.ImmutableList.Builder<SourceFile> |
RefactoringDriver.Builder.inputs |
private static com.google.common.base.Function<java.lang.String,SourceFile> |
RefactoringDriver.Builder.TO_SOURCE_FILE_FN |
Modifier and Type | Method and Description |
---|---|
RefactoringDriver.Builder |
RefactoringDriver.Builder.addExterns(java.lang.Iterable<SourceFile> externs) |
RefactoringDriver.Builder |
RefactoringDriver.Builder.addInputs(java.lang.Iterable<SourceFile> inputs) |
private Compiler |
RefactoringDriver.createCompiler(java.util.List<SourceFile> inputs,
java.util.List<SourceFile> externs,
CompilerOptions compilerOptions) |
private Compiler |
RefactoringDriver.createCompiler(java.util.List<SourceFile> inputs,
java.util.List<SourceFile> externs,
CompilerOptions compilerOptions) |
Constructor and Description |
---|
RefactoringDriver(Scanner scanner,
java.util.List<SourceFile> inputs,
java.util.List<SourceFile> externs,
CompilerOptions compilerOptions) |
RefactoringDriver(Scanner scanner,
java.util.List<SourceFile> inputs,
java.util.List<SourceFile> externs,
CompilerOptions compilerOptions) |