Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.bundle | |
com.google.javascript.jscomp.deps |
Analyzes information about dependencies between files.
|
com.google.javascript.jscomp.transpile | |
com.google.javascript.refactoring |
Modifier and Type | Field and Description |
---|---|
java.util.Set<SourceFile> |
Result.transpiledFiles |
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> sources,
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> sources,
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.
|
Modifier and Type | Method and Description |
---|---|
SourceFile |
SourceFile.Builder.buildFromCode(java.lang.String fileName,
java.lang.String code) |
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.buildFromPath(java.nio.file.Path path) |
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.fromCode(java.lang.String fileName,
java.lang.String code,
StaticSourceFile.SourceKind kind) |
static SourceFile |
SourceFile.fromFile(java.lang.String fileName) |
static SourceFile |
SourceFile.fromFile(java.lang.String fileName,
java.nio.charset.Charset charset) |
static SourceFile |
SourceFile.fromFile(java.lang.String fileName,
java.nio.charset.Charset charset,
StaticSourceFile.SourceKind kind) |
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.fromPath(java.nio.file.Path path,
java.nio.charset.Charset charset) |
static SourceFile |
SourceFile.fromPath(java.nio.file.Path path,
java.nio.charset.Charset charset,
StaticSourceFile.SourceKind kind) |
static SourceFile |
SourceFile.fromReader(java.lang.String fileName,
java.io.Reader r) |
static SourceFile |
SourceFile.fromZipEntry(java.lang.String originalZipPath,
java.lang.String absoluteZipPath,
java.lang.String entryPath,
java.nio.charset.Charset inputCharset) |
SourceFile |
SourceAst.getSourceFile()
Returns the source file the generated AST represents.
|
SourceFile |
JsAst.getSourceFile() |
SourceFile |
RecoverableJsAst.getSourceFile() |
SourceFile |
SyntheticAst.getSourceFile() |
SourceFile |
CompilerInput.getSourceFile() |
SourceFile |
Compiler.ExternalSourceLoader.loadSource(java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<SourceFile> |
AbstractCommandLineRunner.createExterns(CompilerOptions options) |
protected java.util.List<SourceFile> |
CommandLineRunner.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.
|
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.
|
static java.util.List<SourceFile> |
DefaultExterns.prepareExterns(CompilerOptions.Environment env,
java.util.Map<java.lang.String,SourceFile> externs)
Filters and orders the passed externs for the specified environment.
|
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)
Compiles a single source file and a single externs file.
|
java.util.Collection<JsMessage> |
JsMessageExtractor.extractMessages(SourceFile... inputs)
Extracts JS messages from JavaScript code.
|
Node |
Compiler.parse(SourceFile file) |
void |
SourceFile.restoreFrom(SourceFile sourceFile) |
void |
SourceAst.setSourceFile(SourceFile file)
Sets the source file the generated AST represents.
|
void |
JsAst.setSourceFile(SourceFile file) |
void |
RecoverableJsAst.setSourceFile(SourceFile file) |
void |
SyntheticAst.setSourceFile(SourceFile file) |
void |
CompilerInput.setSourceFile(SourceFile file) |
Modifier and Type | Method and Description |
---|---|
static 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.
|
static java.util.List<SourceFile> |
DefaultExterns.prepareExterns(CompilerOptions.Environment env,
java.util.Map<java.lang.String,SourceFile> externs)
Filters and orders the passed externs for the specified environment.
|
static com.google.common.collect.ImmutableList<JSError> |
AbstractCommandLineRunner.removeDuplicateZipEntries(java.util.List<SourceFile> sourceFiles,
java.util.List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Check that relative paths inside zip files are unique, since multiple files with the same path
inside different zips are considered duplicate inputs.
|
Constructor and Description |
---|
CompilerInput(SourceFile file) |
CompilerInput(SourceFile file,
boolean isExtern) |
JsAst(SourceFile sourceFile) |
SourceMapInput(SourceFile sourceFile) |
Modifier and Type | Field and Description |
---|---|
protected static SourceFile |
CompilerBasedTransformer.CompilerSupplier.EMPTY |
protected static SourceFile |
CompilerBasedTransformer.CompilerSupplier.EXTERNS |
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,
ModuleLoader loader)
Creates a new DepsGenerator.
|
DepsGenerator(java.util.Collection<SourceFile> deps,
java.util.Collection<SourceFile> srcs,
DepsGenerator.InclusionStrategy mergeStrategy,
java.lang.String closurePathAbs,
ErrorManager errorManager,
ModuleLoader loader)
Creates a new DepsGenerator.
|
Modifier and Type | Field and Description |
---|---|
protected static SourceFile |
BaseTranspiler.CompilerSupplier.EMPTY |
protected static SourceFile |
BaseTranspiler.CompilerSupplier.EXTERNS |
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) |
Copyright © 2009-2019 Google. All Rights Reserved.