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 TypeMethodDescriptionboolean
checkRunDone
(boolean value) Check if run has been invoked.static void
Work around an AWT bug, where AWT threads are non-daemon.static void
See exitDecrement.static boolean
True if runAsMain should print values (in top-level expressions).void
run()
static void
run
(RunnableModule mod, Consumer out) void
void
run
(CallContext ctx) final void
This is invoked by main when ModuleBody is compiled with --main.static void
runAsMain
(RunnableModule module) This is invoked by main when ModuleBody is compiled with --main.static void
runCleanup
(CallContext ctx, Throwable th, Consumer save) static void
runToVoid
(RunnableModule mod) static void
setMainPrintValues
(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:RunnableModule
Check if run has been invoked.- Specified by:
checkRunDone
in interfaceRunnableModule
- Parameters:
value
- - should be true - probably pointless.
-
run
- Specified by:
run
in 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.
-