public static class BaseTranspiler.CompilerSupplier
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static SourceFile |
EMPTY |
protected static DiagnosticGroup |
ES5_WARNINGS |
protected static SourceFile |
EXTERNS |
protected ModuleLoader.ResolutionMode |
moduleResolution |
protected com.google.common.collect.ImmutableList<java.lang.String> |
moduleRoots |
protected FeatureSet |
outputFeatureSet |
protected com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> |
prefixReplacements |
Constructor and Description |
---|
CompilerSupplier() |
CompilerSupplier(FeatureSet outputFeatureSet) |
CompilerSupplier(FeatureSet outputFeatureSet,
ModuleLoader.ResolutionMode moduleResolution,
com.google.common.collect.ImmutableList<java.lang.String> moduleRoots,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> prefixReplacements)
Accepts commonly overridden options for ES6 modules to avoid needed to subclass.
|
Modifier and Type | Method and Description |
---|---|
BaseTranspiler.CompileResult |
compile(java.net.URI path,
java.lang.String code) |
protected Compiler |
compiler() |
protected CompilerOptions |
options() |
java.lang.String |
runtime(java.lang.String library) |
protected void |
setOptions(CompilerOptions options) |
protected final ModuleLoader.ResolutionMode moduleResolution
protected final com.google.common.collect.ImmutableList<java.lang.String> moduleRoots
protected final com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> prefixReplacements
protected final FeatureSet outputFeatureSet
protected static final SourceFile EXTERNS
protected static final SourceFile EMPTY
protected static final DiagnosticGroup ES5_WARNINGS
public CompilerSupplier()
public CompilerSupplier(FeatureSet outputFeatureSet)
public CompilerSupplier(FeatureSet outputFeatureSet, ModuleLoader.ResolutionMode moduleResolution, com.google.common.collect.ImmutableList<java.lang.String> moduleRoots, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> prefixReplacements)
moduleResolution
- module resolution for resolving import pathsprefixReplacements
- prefix replacements for when moduleResolution is ModuleLoader.ResolutionMode#BROWSER_WITH_TRANSFORMED_PREFIXES
public BaseTranspiler.CompileResult compile(java.net.URI path, java.lang.String code)
public java.lang.String runtime(java.lang.String library)
protected Compiler compiler()
protected CompilerOptions options()
protected void setOptions(CompilerOptions options)
Copyright © 2009-2019 Google. All Rights Reserved.