Class ModuleGenerator

java.lang.Object
de.inetsoftware.jwebassembly.module.ModuleGenerator

public class ModuleGenerator extends Object
Generate the WebAssembly output.
Author:
Volker Berlin
  • Constructor Details

    • ModuleGenerator

      public ModuleGenerator(@Nonnull ModuleWriter writer, WasmTarget target, @Nonnull List<URL> libraries)
      Create a new generator.
      Parameters:
      writer - the target writer
      target - the target for the module data
      libraries - libraries
  • Method Details

    • prepare

      public void prepare(@Nonnull ClassFile classFile) throws IOException
      Prepare the content of the class.
      Parameters:
      classFile - the class file
      Throws:
      WasmException - if some Java code can't converted
      IOException - if any I/O error occur
    • prepareFinish

      public void prepareFinish() throws IOException
      Finish the prepare after all classes/methods are prepare. This must be call before we can start with write the first method.
      Throws:
      IOException - if any I/O error occur
    • finish

      public void finish() throws IOException
      Finish the code generation.
      Throws:
      IOException - if any I/O error occur