Package gnu.expr
Class ModuleBody
java.lang.Object
gnu.expr.ModuleBody
- All Implemented Interfaces:
RunnableModule
Class for the dummy top-level function of a module.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckRunDone(boolean value) Check if run has been invoked.static voidWork around an AWT bug, where AWT threads are non-daemon.static voidSee exitDecrement.static booleanTrue if runAsMain should print values (in top-level expressions).voidrun()static voidrun(RunnableModule mod, Consumer out) voidvoidrun(CallContext ctx) final voidThis is invoked by main when ModuleBody is compiled with --main.static voidrunAsMain(RunnableModule module) This is invoked by main when ModuleBody is compiled with --main.static voidrunCleanup(CallContext ctx, Throwable th, Consumer save) static voidrunToVoid(RunnableModule mod) static voidsetMainPrintValues(boolean value)
-
Field Details
-
runDone
protected boolean runDone
-
-
Constructor Details
-
ModuleBody
public ModuleBody()
-
-
Method Details
-
checkRunDone
public boolean checkRunDone(boolean value) Description copied from interface:RunnableModuleCheck if run has been invoked.- Specified by:
checkRunDonein interfaceRunnableModule- Parameters:
value- - should be true - probably pointless.
-
run
- Specified by:
runin interfaceRunnableModule- Throws:
Throwable
-
run
public void run() -
runToVoid
-
run
-
run
-
runCleanup
-
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
This is invoked by main when ModuleBody is compiled with --main.
-