java.lang.Object
swim.dynamic.Bridge
swim.vm.VmBridge
swim.vm.js.JsBridge
- All Implemented Interfaces:
JsModuleLoader
,JsModuleResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JsModule
createGuestModule
(JsModuleSystem moduleSystem, UriPath moduleId, org.graalvm.polyglot.Source moduleSource) protected Object
createGuestPrototype
(HostType<?> hostType) protected Object
createGuestType
(HostType<?> hostType) protected JsModule
createHostModule
(JsModuleSystem moduleSystem, UriPath moduleId, HostLibrary hostLibrary) eval
(String moduleId, CharSequence source) eval
(UriPath moduleId, CharSequence source) void
evalModule
(JsModule module) getHostModule
(UriPath moduleId) <T> Object
hostMethodToGuestMethod
(HostMethod<? super T> method, T self) hostStaticMethodToGuestStaticMethod
(HostStaticMethod staticMethod) <T> Object
hostTypedValueToGuestProxy
(HostType<? super T> hostType, T hostValue) hostTypeToGuestPrototype
(HostType<?> hostType) hostTypeToGuestType
(HostType<?> hostType) final org.graalvm.polyglot.Context
final JsRuntime
protected JsModule
loadGuestModule
(JsModuleSystem moduleSystem, UriPath moduleId) protected JsModule
loadHostModule
(JsModuleSystem moduleSystem, UriPath moduleId) loadModule
(JsModuleSystem moduleSystem, UriPath moduleId) org.graalvm.polyglot.Source
loadModuleSource
(UriPath moduleId) resolveModulePath
(UriPath basePath, UriPath modulePath) Methods inherited from class swim.vm.VmBridge
getHostLibrary, getHostPackage, getHostType, guestCanExecute, guestCanInvokeMember, guestExecute, guestExecuteVoid, guestInvokeMember, guestLanguage, guestToHost, hostLibraries, hostPackages, hostRuntime, hostToGuest, hostType, hostTypes, isNativeHostClass, setGuestLanguage
-
Constructor Details
-
JsBridge
-
-
Method Details
-
jsRuntime
-
jsContext
public final org.graalvm.polyglot.Context jsContext() -
moduleResolver
-
getHostModule
-
hostModules
-
hostTypedValueToGuestProxy
- Overrides:
hostTypedValueToGuestProxy
in classVmBridge
-
hostMethodToGuestMethod
- Overrides:
hostMethodToGuestMethod
in classVmBridge
-
hostStaticMethodToGuestStaticMethod
- Overrides:
hostStaticMethodToGuestStaticMethod
in classVmBridge
-
createGuestType
-
hostTypeToGuestType
-
createGuestPrototype
-
hostTypeToGuestPrototype
-
guestObjectPrototype
-
guestFunctionPrototype
-
resolveModulePath
- Specified by:
resolveModulePath
in interfaceJsModuleLoader
- Specified by:
resolveModulePath
in interfaceJsModuleResolver
-
loadModuleSource
- Specified by:
loadModuleSource
in interfaceJsModuleResolver
-
loadModule
- Specified by:
loadModule
in interfaceJsModuleLoader
-
loadHostModule
-
createHostModule
protected JsModule createHostModule(JsModuleSystem moduleSystem, UriPath moduleId, HostLibrary hostLibrary) -
loadGuestModule
-
createGuestModule
protected JsModule createGuestModule(JsModuleSystem moduleSystem, UriPath moduleId, org.graalvm.polyglot.Source moduleSource) -
evalModule
- Specified by:
evalModule
in interfaceJsModuleLoader
-
eval
-
eval
-
eval
-