Class JavaScriptWriter
java.lang.Object
de.inetsoftware.jwebassembly.javascript.JavaScriptWriter
Write JavaScipt glue code.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an import from a needed function with import annotation.void
finish()
Finish the accumulate of imports and write the JavaScript file.(package private) void
finish
(Appendable out) Finish the accumulate of imports and write the JavaScript to the Appendable.
-
Field Details
-
target
-
JAVA_SCRIPT_CONTENT
annotation attribute for the JavaScript content- See Also:
-
modules
-
-
Constructor Details
-
JavaScriptWriter
Create a new instance- Parameters:
target
- the target for the module data.
-
-
Method Details
-
addImport
Add an import from a needed function with import annotation.- Parameters:
module
- the module namename
- the function nameannotationValues
- the other values of the annotation
-
finish
Finish the accumulate of imports and write the JavaScript file.- Throws:
IOException
- if any I/O error occur
-
finish
Finish the accumulate of imports and write the JavaScript to the Appendable.- Parameters:
out
- the target for the script- Throws:
IOException
- if any I/O error occur
-