Class CompilerBasedTransformer
- java.lang.Object
-
- com.google.javascript.jscomp.bundle.CompilerBasedTransformer
-
- All Implemented Interfaces:
Source.Transformer
- Direct Known Subclasses:
CoverageInstrumenter
,Transpiler
@GwtIncompatible @Immutable public abstract class CompilerBasedTransformer extends java.lang.Object implements Source.Transformer
A source transformer base class. May also include a runtime that needs to be shipped with the final bundle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompilerBasedTransformer.CompileResult
The source together with the additional compilation results.static class
CompilerBasedTransformer.CompilerSupplier
Wraps the Compiler into a more relevant interface, making it easy to test the CompilerBasedTransformer without depending on implementation details of the Compiler itself.
-
Constructor Summary
Constructors Constructor Description CompilerBasedTransformer(CompilerBasedTransformer.CompilerSupplier compilerSupplier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Optional<java.lang.String>
getRuntime()
abstract java.lang.String
getTranformationName()
Source
transform(Source input)
The main transformation method.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.javascript.jscomp.bundle.Source.Transformer
andThen, asFunction, compose
-
-
-
-
Constructor Detail
-
CompilerBasedTransformer
public CompilerBasedTransformer(CompilerBasedTransformer.CompilerSupplier compilerSupplier)
-
-
Method Detail
-
getRuntime
public abstract java.util.Optional<java.lang.String> getRuntime()
-
getTranformationName
public abstract java.lang.String getTranformationName()
-
transform
public Source transform(Source input)
Description copied from interface:Source.Transformer
The main transformation method.- Specified by:
transform
in interfaceSource.Transformer
-
-