public final class BaseTranspiler extends java.lang.Object implements Transpiler
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseTranspiler.CompileResult
The source together with the additional compilation results.
|
static class |
BaseTranspiler.CompilerSupplier
Wraps the Compiler into a more relevant interface, making it
easy to test the Transpiler without depending on implementation
details of the Compiler itself.
|
| Modifier and Type | Field and Description |
|---|---|
static BaseTranspiler |
ES5_TRANSPILER |
static BaseTranspiler |
LATEST_TRANSPILER |
NULL| Constructor and Description |
|---|
BaseTranspiler(BaseTranspiler.CompilerSupplier compilerSupplier,
java.lang.String runtimeLibraryName) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
runtime()
Returns any necessary runtime code as a string.
|
static BaseTranspiler |
to(FeatureSet featureSet) |
static BaseTranspiler |
to(FeatureSet featureSet,
java.lang.String runtime) |
TranspileResult |
transpile(java.net.URI path,
java.lang.String code)
Transforms the given chunk of code.
|
public static final BaseTranspiler LATEST_TRANSPILER
public static final BaseTranspiler ES5_TRANSPILER
public BaseTranspiler(BaseTranspiler.CompilerSupplier compilerSupplier, java.lang.String runtimeLibraryName)
public TranspileResult transpile(java.net.URI path, java.lang.String code)
Transpilertranspile in interface Transpilerpublic java.lang.String runtime()
Transpilerruntime in interface Transpilerpublic static final BaseTranspiler to(FeatureSet featureSet, java.lang.String runtime)
public static final BaseTranspiler to(FeatureSet featureSet)
Copyright © 2009-2020 Google. All Rights Reserved.