Package com.whl.quickjs.wrapper
Class QuickJSContext.DefaultModuleLoader
- java.lang.Object
-
- com.whl.quickjs.wrapper.QuickJSContext.DefaultModuleLoader
-
- All Implemented Interfaces:
ModuleLoader
- Enclosing class:
- QuickJSContext
public abstract static class QuickJSContext.DefaultModuleLoader extends java.lang.Object implements ModuleLoader
-
-
Constructor Summary
Constructors Constructor Description DefaultModuleLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getModuleBytecode(java.lang.String moduleName)获取字节码代码内容booleanisBytecodeMode()模块加载模式: True 会调用ModuleLoader.getModuleBytecode(String)False 会调用ModuleLoader.getModuleStringCode(String)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.whl.quickjs.wrapper.ModuleLoader
getModuleStringCode
-
-
-
-
Method Detail
-
isBytecodeMode
public boolean isBytecodeMode()
Description copied from interface:ModuleLoader模块加载模式: True 会调用ModuleLoader.getModuleBytecode(String)False 会调用ModuleLoader.getModuleStringCode(String)- Specified by:
isBytecodeModein interfaceModuleLoader- Returns:
- 是否字节码模式
-
getModuleBytecode
public byte[] getModuleBytecode(java.lang.String moduleName)
Description copied from interface:ModuleLoader获取字节码代码内容- Specified by:
getModuleBytecodein interfaceModuleLoader- Parameters:
moduleName- 模块路径名,例如 "xxx.js"- Returns:
- 代码内容
-
-