Package com.google.javascript.jscomp
Class PassFactory.Builder
- java.lang.Object
-
- com.google.javascript.jscomp.PassFactory.Builder
-
- Enclosing class:
- PassFactory
public abstract static class PassFactory.Builder extends java.lang.Object
A builder for aPassFactory
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PassFactory
build()
abstract PassFactory.Builder
setFeatureSet(FeatureSet x)
Set the features that are allowed to be in the AST when this pass runs.PassFactory.Builder
setFeatureSetForChecks()
Record that the pass will support all of the features required for checks passes.PassFactory.Builder
setFeatureSetForOptimizations()
Record that the pass will support all of the features required for optimization passes.abstract PassFactory.Builder
setInternalFactory(java.util.function.Function<AbstractCompiler,? extends CompilerPass> x)
abstract PassFactory.Builder
setName(java.lang.String x)
abstract PassFactory.Builder
setRunInFixedPointLoop(boolean b)
-
-
-
Method Detail
-
setName
public abstract PassFactory.Builder setName(java.lang.String x)
-
setRunInFixedPointLoop
public abstract PassFactory.Builder setRunInFixedPointLoop(boolean b)
-
setFeatureSet
public abstract PassFactory.Builder setFeatureSet(FeatureSet x)
Set the features that are allowed to be in the AST when this pass runs.In general client code should call either
setFeatureSetForChecks()
orsetFeatureSetForOptimizations()
instead. This method exists only to support those methods and special cases such as transpilation passes and tests.
-
setInternalFactory
public abstract PassFactory.Builder setInternalFactory(java.util.function.Function<AbstractCompiler,? extends CompilerPass> x)
-
setFeatureSetForChecks
public final PassFactory.Builder setFeatureSetForChecks()
Record that the pass will support all of the features required for checks passes.
-
setFeatureSetForOptimizations
public final PassFactory.Builder setFeatureSetForOptimizations()
Record that the pass will support all of the features required for optimization passes.
-
build
public final PassFactory build()
-
-