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.
|
com.google.javascript.refactoring |
Modifier and Type | Field and Description |
---|---|
Set<SourceFile> |
Result.transpiledFiles |
Modifier and Type | Method and Description |
---|---|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.compile(List<T1> externs,
List<T2> inputs,
CompilerOptions options)
Compiles a list of inputs.
|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.compile(List<T1> externs,
List<T2> inputs,
CompilerOptions options)
Compiles a list of inputs.
|
<T extends SourceFile> |
Compiler.compileModules(List<T> externs,
List<JSModule> modules,
CompilerOptions options)
Compiles a list of modules.
|
<T extends SourceFile> |
JsMessageExtractor.extractMessages(Iterable<T> inputs)
Extracts JS messages from JavaScript code.
|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.init(List<T1> externs,
List<T2> inputs,
CompilerOptions options)
Initializes the instance state needed for a compile job.
|
<T1 extends SourceFile,T2 extends SourceFile> |
Compiler.init(List<T1> externs,
List<T2> inputs,
CompilerOptions options)
Initializes the instance state needed for a compile job.
|
<T extends SourceFile> |
Compiler.initModules(List<T> externs,
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(String fileName,
String code) |
SourceFile |
SourceFile.Builder.buildFromFile(File file) |
SourceFile |
SourceFile.Builder.buildFromFile(String fileName) |
SourceFile |
SourceFile.Builder.buildFromGenerator(String fileName,
SourceFile.Generator generator) |
SourceFile |
SourceFile.Builder.buildFromInputStream(String fileName,
InputStream s) |
SourceFile |
SourceFile.Builder.buildFromReader(String fileName,
Reader r) |
SourceFile |
SourceFile.Builder.buildFromUrl(URL url) |
static SourceFile |
SourceFile.fromCode(String fileName,
String code) |
static SourceFile |
SourceFile.fromFile(File file) |
static SourceFile |
SourceFile.fromFile(File file,
Charset c) |
static SourceFile |
SourceFile.fromFile(String fileName) |
static SourceFile |
SourceFile.fromFile(String fileName,
Charset c) |
static SourceFile |
SourceFile.fromGenerator(String fileName,
SourceFile.Generator generator) |
static SourceFile |
SourceFile.fromInputStream(String fileName,
InputStream s)
Deprecated.
|
static SourceFile |
SourceFile.fromInputStream(String fileName,
InputStream s,
Charset charset) |
static SourceFile |
SourceFile.fromReader(String fileName,
Reader r) |
static SourceFile |
SourceFile.fromZipEntry(String originalZipPath,
String absoluteZipPath,
String entryPath,
Charset inputCharset) |
SourceFile |
CompilerInput.getSourceFile() |
SourceFile |
SyntheticAst.getSourceFile() |
SourceFile |
SourceAst.getSourceFile()
Returns the source file the generated AST represents.
|
SourceFile |
JsAst.getSourceFile() |
SourceFile |
RecoverableJsAst.getSourceFile() |
Modifier and Type | Method and Description |
---|---|
protected List<SourceFile> |
CommandLineRunner.createExterns(CompilerOptions options) |
protected List<SourceFile> |
AbstractCommandLineRunner.createExterns(CompilerOptions options) |
protected List<SourceFile> |
AbstractCommandLineRunner.createInputs(List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
boolean allowStdIn,
List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Creates inputs from a list of files.
|
protected List<SourceFile> |
AbstractCommandLineRunner.createInputs(List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
List<AbstractCommandLineRunner.JsonFileSpec> jsonFiles,
boolean allowStdIn,
List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Creates inputs from a list of source files, zips and json files.
|
protected List<SourceFile> |
AbstractCommandLineRunner.createInputs(List<AbstractCommandLineRunner.FlagEntry<AbstractCommandLineRunner.JsSourceType>> files,
List<AbstractCommandLineRunner.JsonFileSpec> jsonFiles,
List<AbstractCommandLineRunner.JsModuleSpec> jsModuleSpecs)
Creates inputs from a list of source files and json files.
|
static List<SourceFile> |
SourceFile.fromZipFile(String zipName,
Charset inputCharset) |
static List<SourceFile> |
AbstractCommandLineRunner.getBuiltinExterns(CompilerOptions.Environment env) |
static List<SourceFile> |
CommandLineRunner.getDefaultExterns()
Deprecated.
|
static List<SourceFile> |
DefaultExterns.prepareExterns(CompilerOptions.Environment env,
Map<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.
|
void |
SourceMap.addSourceFile(SourceFile sourceFile) |
Result |
Compiler.compile(SourceFile extern,
SourceFile input,
CompilerOptions options) |
Collection<JsMessage> |
JsMessageExtractor.extractMessages(SourceFile... inputs)
Extracts JS messages from JavaScript code.
|
Node |
Compiler.parse(SourceFile file) |
void |
CompilerInput.setSourceFile(SourceFile file) |
void |
SyntheticAst.setSourceFile(SourceFile file) |
void |
SourceAst.setSourceFile(SourceFile file)
Sets the source file the generated AST represents.
|
void |
JsAst.setSourceFile(SourceFile file) |
void |
RecoverableJsAst.setSourceFile(SourceFile file) |
Modifier and Type | Method and Description |
---|---|
static List<SourceFile> |
DefaultExterns.prepareExterns(CompilerOptions.Environment env,
Map<String,SourceFile> externs)
Filters and orders the passed externs for the specified environment.
|
static List<JSError> |
AbstractCommandLineRunner.removeDuplicateZipEntries(List<SourceFile> sourceFiles,
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 | 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(Collection<SourceFile> deps,
Collection<SourceFile> srcs,
DepsGenerator.InclusionStrategy mergeStrategy,
String closurePathAbs,
ErrorManager errorManager,
ModuleLoader loader)
Creates a new DepsGenerator.
|
DepsGenerator(Collection<SourceFile> deps,
Collection<SourceFile> srcs,
DepsGenerator.InclusionStrategy mergeStrategy,
String closurePathAbs,
ErrorManager errorManager,
ModuleLoader loader)
Creates a new DepsGenerator.
|
Modifier and Type | Method and Description |
---|---|
RefactoringDriver.Builder |
RefactoringDriver.Builder.addExterns(Iterable<SourceFile> externs) |
RefactoringDriver.Builder |
RefactoringDriver.Builder.addInputs(Iterable<SourceFile> inputs) |
Copyright © 2009-2016 Google. All Rights Reserved.