public class ModuleLoader.ModulePath
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
ModuleLoader.ModulePath |
resolveJsModule(java.lang.String moduleAddress)
Find a JS module
requireName . |
ModuleLoader.ModulePath |
resolveJsModule(java.lang.String moduleAddress,
java.lang.String sourcename,
int lineno,
int colno)
Find a JS module
requireName . |
ModuleLoader.ModulePath |
resolveModuleAsPath(java.lang.String moduleAddress)
Treats the module address as a path and returns the name of that module.
|
java.lang.String |
toJSIdentifier()
Turns a filename into a JS identifier that can be used in rewritten code.
|
java.lang.String |
toModuleName()
Turns a filename into a JS identifier that is used for moduleNames in
rewritten code.
|
java.lang.String |
toString() |
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toJSIdentifier()
public java.lang.String toModuleName()
@Nullable public ModuleLoader.ModulePath resolveJsModule(java.lang.String moduleAddress)
requireName
. See
https://nodejs.org/api/modules.html#modules_all_togethernull
if not found.@Nullable public ModuleLoader.ModulePath resolveJsModule(java.lang.String moduleAddress, java.lang.String sourcename, int lineno, int colno)
requireName
. See
https://nodejs.org/api/modules.html#modules_all_togethernull
if not found.public ModuleLoader.ModulePath resolveModuleAsPath(java.lang.String moduleAddress)
Primarily used for per-file ES6 module transpilation
Copyright © 2009-2018 Google. All Rights Reserved.