Class ModuleMapCreator
- java.lang.Object
-
- com.google.javascript.jscomp.modules.ModuleMapCreator
-
- All Implemented Interfaces:
CompilerPass
,HotSwapCompilerPass
public class ModuleMapCreator extends java.lang.Object implements HotSwapCompilerPass
Creates aModuleMap
.
-
-
Field Summary
Fields Modifier and Type Field Description static DiagnosticType
DOES_NOT_HAVE_EXPORT
static DiagnosticType
DOES_NOT_HAVE_EXPORT_WITH_DETAILS
static DiagnosticType
MISSING_NAMESPACE_IMPORT
-
Constructor Summary
Constructors Constructor Description ModuleMapCreator(AbstractCompiler compiler, ModuleMetadataMap moduleMetadataMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
hotSwapScript(Node scriptRoot, Node originalRoot)
Process the JS with root node root.void
process(Node externs, Node root)
Process the JS with root node root.
-
-
-
Field Detail
-
MISSING_NAMESPACE_IMPORT
public static final DiagnosticType MISSING_NAMESPACE_IMPORT
-
DOES_NOT_HAVE_EXPORT
public static final DiagnosticType DOES_NOT_HAVE_EXPORT
-
DOES_NOT_HAVE_EXPORT_WITH_DETAILS
public static final DiagnosticType DOES_NOT_HAVE_EXPORT_WITH_DETAILS
-
-
Constructor Detail
-
ModuleMapCreator
public ModuleMapCreator(AbstractCompiler compiler, ModuleMetadataMap moduleMetadataMap)
-
-
Method Detail
-
process
public void process(Node externs, Node root)
Description copied from interface:CompilerPass
Process the JS with root node root. Can modify the contents of each Node tree- Specified by:
process
in interfaceCompilerPass
- Parameters:
externs
- Top of external JS treeroot
- Top of JS tree
-
hotSwapScript
public void hotSwapScript(Node scriptRoot, Node originalRoot)
Description copied from interface:HotSwapCompilerPass
Process the JS with root node root. This is supposed to be significantly faster compared to corresponding full-compiler passes.- Specified by:
hotSwapScript
in 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
.
-
-