public class ModuleLoader.ModulePath
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
equalsIgnoreLeadingSlash(ModuleLoader.ModulePath other)
Determines if this path is the same as another path, ignoring any potential leading slashes
on both.
|
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 |
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 boolean equalsIgnoreLeadingSlash(ModuleLoader.ModulePath other)
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-2019 Google. All Rights Reserved.