Package gnu.expr

Class ModuleBody

  • All Implemented Interfaces:
    RunnableModule

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

      • runDone

        protected boolean runDone
    • Constructor Detail

      • ModuleBody

        public ModuleBody()
    • Method Detail

      • 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()
      • run

        public void run​(Consumer out)
      • 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.