public class JavaScriptWriter
extends java.lang.Object
| Constructor and Description |
|---|
JavaScriptWriter(WasmTarget target)
Create a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImport(java.lang.String module,
java.lang.String name,
java.util.function.Function<java.lang.String,java.lang.Object> annotationValues)
Add an import from a needed function with import annotation.
|
void |
finish()
Finish the accumulate of imports and write the JavaScript file.
|
public JavaScriptWriter(WasmTarget target)
target - the target for the module data.public void addImport(java.lang.String module,
java.lang.String name,
java.util.function.Function<java.lang.String,java.lang.Object> annotationValues)
module - the module namename - the function nameannotationValues - the other values of the annotationpublic void finish()
throws java.io.IOException
java.io.IOException - if any I/O error occur