Package com.google.javascript.jscomp
Class FieldCleanupPass
- java.lang.Object
-
- com.google.javascript.jscomp.FieldCleanupPass
-
- All Implemented Interfaces:
CompilerPass,HotSwapCompilerPass
public final class FieldCleanupPass extends java.lang.Object implements HotSwapCompilerPass
A CleanupPass implementation that will remove all field declarations on JSTypes contributed by the original file.This pass is expected to clear out declarations contributed to any JSType, even if the constructor declaration is not provided in the file being updated.
-
-
Constructor Summary
Constructors Constructor Description FieldCleanupPass(AbstractCompiler compiler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhotSwapScript(Node scriptRoot, Node originalRoot)Process the JS with root node root.voidprocess(Node externs, Node root)Process the JS with root node root.
-
-
-
Constructor Detail
-
FieldCleanupPass
public FieldCleanupPass(AbstractCompiler compiler)
-
-
Method Detail
-
hotSwapScript
public void hotSwapScript(Node scriptRoot, Node originalRoot)
Description copied from interface:HotSwapCompilerPassProcess the JS with root node root. This is supposed to be significantly faster compared to corresponding full-compiler passes.- Specified by:
hotSwapScriptin interfaceHotSwapCompilerPass- Parameters:
scriptRoot- Root node corresponding to the file that is modified, should be of typeToken.SCRIPT.originalRoot- Root node corresponding to the original version of the file that is modified. Should be of typetoken.SCRIPT.
-
process
public void process(Node externs, Node root)
Description copied from interface:CompilerPassProcess the JS with root node root. Can modify the contents of each Node tree- Specified by:
processin interfaceCompilerPass- Parameters:
externs- Top of external JS treeroot- Top of JS tree
-
-