Class JWebAssemblyEmulator

java.lang.Object
de.inetsoftware.jwebassembly.emulator.JWebAssemblyEmulator

public class JWebAssemblyEmulator extends Object
The main class start point for the emulator.
  • Constructor Details

    • JWebAssemblyEmulator

      public JWebAssemblyEmulator()
  • Method Details

    • launchResource

      public static void launchResource(@Nonnull String htmlPage, @Nonnull Runnable main)
      Start the emulator from a resource file, load the html page and call the given main method.
      Parameters:
      htmlPage - The resource of the html page that the WebAssembly contains.
      main - the executable with the main function
    • launchURL

      public static void launchURL(@Nonnull URL htmlPageURL, @Nonnull Runnable main)
      Start the emulator from a URL, load the html page and call the given main method.
      Parameters:
      htmlPageURL - The URL of the html page that the WebAssembly contains.
      main - the executable with the main function
    • launchContent

      public static void launchContent(@Nonnull String content, @Nonnull Runnable main)
      Start the emulator from a URL, load the html page and call the given main method.
      Parameters:
      content - The content of the html page that the WebAssembly contains.
      main - the executable with the main function
    • launch

      private static void launch(String htmlPageURL, String content, @Nonnull Runnable main)
      Start the emulator.
      Parameters:
      htmlPageURL - The URL of the html page that the WebAssembly contains.
      content - The content of the html page that the WebAssembly contains.
      main - the executable with the main function
    • hide

      static void hide()
      Hide the emulator window
    • throwAny

      static <E extends Throwable> void throwAny(Throwable e) throws E
      Throws any (checked) exception without in signature
      Type Parameters:
      E - any Throwable
      Parameters:
      e - the exception
      Throws:
      E - any Throwable