- java.lang.Object
-
- swim.vm.js.JsNodeModuleResolver
-
- All Implemented Interfaces:
JsModuleResolver
public class JsNodeModuleResolver extends Object implements JsModuleResolver
-
-
Constructor Summary
Constructors Constructor Description JsNodeModuleResolver()
JsNodeModuleResolver(UriPath rootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.graalvm.polyglot.Source
loadModuleSource(UriPath moduleId)
Value
loadPackage(UriPath packagePath)
protected void
prefixModuleSource(UriPath moduleId, StringBuilder sourceBuilder)
protected UriPath
resolveAbsoluteModulePath(UriPath basePath, UriPath modulePath)
UriPath
resolveModuleDirectory(UriPath directoryPath)
UriPath
resolveModuleDirectoryIndex(UriPath directoryPath, String extension)
UriPath
resolveModuleDirectoryPackage(UriPath directoryPath)
UriPath
resolveModulePackage(UriPath packagePath)
UriPath
resolveModulePath(UriPath basePath, UriPath modulePath)
UriPath
resolveModuleScript(UriPath modulePath, String extension)
UriPath
resolveNodeModulesPath(UriPath directoryPath, UriPath modulePath)
protected UriPath
resolveRelativeModulePath(UriPath basePath, UriPath modulePath)
UriPath
rootPath()
protected void
suffixModuleSource(UriPath moduleId, StringBuilder sourceBuilder)
-
-
-
Constructor Detail
-
JsNodeModuleResolver
public JsNodeModuleResolver(UriPath rootPath)
-
JsNodeModuleResolver
public JsNodeModuleResolver()
-
-
Method Detail
-
rootPath
public final UriPath rootPath()
-
resolveModulePath
public UriPath resolveModulePath(UriPath basePath, UriPath modulePath)
- Specified by:
resolveModulePath
in interfaceJsModuleResolver
-
resolveRelativeModulePath
protected UriPath resolveRelativeModulePath(UriPath basePath, UriPath modulePath)
-
resolveAbsoluteModulePath
protected UriPath resolveAbsoluteModulePath(UriPath basePath, UriPath modulePath)
-
resolveNodeModulesPath
public UriPath resolveNodeModulesPath(UriPath directoryPath, UriPath modulePath)
-
resolveModuleDirectoryIndex
public UriPath resolveModuleDirectoryIndex(UriPath directoryPath, String extension)
-
prefixModuleSource
protected void prefixModuleSource(UriPath moduleId, StringBuilder sourceBuilder)
-
suffixModuleSource
protected void suffixModuleSource(UriPath moduleId, StringBuilder sourceBuilder)
-
loadModuleSource
public org.graalvm.polyglot.Source loadModuleSource(UriPath moduleId)
- Specified by:
loadModuleSource
in interfaceJsModuleResolver
-
-