Package com.google.javascript.jscomp
Class PassFactory
- java.lang.Object
-
- com.google.javascript.jscomp.PassFactory
-
public abstract class PassFactory extends java.lang.Object
A factory for creating JSCompiler passes based on the Options injected.Contains all meta-data about compiler passes (like whether it can be run multiple times, a human-readable name for logging, etc.).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PassFactory.Builder
A builder for aPassFactory
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static PassFactory.Builder
builder()
static PassFactory
createEmptyPass(java.lang.String name)
Create a no-op pass that can only run once.abstract FeatureSet
getFeatureSet()
The set of features that this pass understands.abstract java.lang.String
getName()
The name of the pass as it will appear in logs.abstract boolean
isRunInFixedPointLoop()
Whether this factory must or must not appear in aPhaseOptimizer
loop.abstract PassFactory.Builder
toBuilder()
-
-
-
Method Detail
-
getName
public abstract java.lang.String getName()
The name of the pass as it will appear in logs.
-
isRunInFixedPointLoop
public abstract boolean isRunInFixedPointLoop()
Whether this factory must or must not appear in aPhaseOptimizer
loop.
-
getFeatureSet
public abstract FeatureSet getFeatureSet()
The set of features that this pass understands.Passes that can handle any code (no-op passes, extremely simple passes that are unlikely to be broken by new features, etc.) should return
FeatureSet.latest()
.
-
toBuilder
public abstract PassFactory.Builder toBuilder()
-
builder
public static PassFactory.Builder builder()
-
createEmptyPass
public static PassFactory createEmptyPass(java.lang.String name)
Create a no-op pass that can only run once. Used to break up loops.
-
-