Package gnu.expr

Class ModuleBody

java.lang.Object
gnu.expr.ModuleBody
All Implemented Interfaces:
RunnableModule

public abstract class ModuleBody extends Object implements RunnableModule
Class for the dummy top-level function of a module.
  • Field Details

    • runDone

      protected boolean runDone
  • Constructor Details

    • ModuleBody

      public ModuleBody()
  • Method Details

    • checkRunDone

      public boolean checkRunDone(boolean value)
      Description copied from interface: RunnableModule
      Check if run has been invoked.
      Specified by:
      checkRunDone in interface RunnableModule
      Parameters:
      value - - should be true - probably pointless.
    • run

      public void run(CallContext ctx) throws Throwable
      Specified by:
      run in interface RunnableModule
      Throws:
      Throwable
    • run

      public void run()
    • runToVoid

      public static void runToVoid(RunnableModule mod)
    • run

      public void run(Consumer out)
    • run

      public static void run(RunnableModule mod, Consumer out)
    • runCleanup

      public static void runCleanup(CallContext ctx, Throwable th, Consumer save)
    • getMainPrintValues

      public static boolean getMainPrintValues()
      True if runAsMain should print values (in top-level expressions).
    • setMainPrintValues

      public static void setMainPrintValues(boolean value)
    • exitIncrement

      public static void exitIncrement()
      See exitDecrement.
    • exitDecrement

      public static void exitDecrement()
      Work around an AWT bug, where AWT threads are non-daemon. Thus if you start up AWT, the JVM will wait for the AWT to finish, even if there are no other non-daemon threads. So call exitIncrement() each time a Freme is created, and call exitDecrement() when a Frame is closed.
    • runAsMain

      public final void runAsMain()
      This is invoked by main when ModuleBody is compiled with --main.
    • runAsMain

      public static void runAsMain(RunnableModule module)
      This is invoked by main when ModuleBody is compiled with --main.