java.lang.Object
simula.runtime.RTS_COMMON
Utility class containing a lot of common stuff.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Runtime Options(package private) static class
S-PORT Options -
Field Summary
Modifier and TypeFieldDescription(package private) static RTS_ConsolePanel
The runtime console.(package private) static String
The current module ident.(package private) static int
The current simula source line number.(package private) static int
Number of edit overflows.(package private) static String
The program ident. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Utility: Set current modid and Simula source line number.private static void
Utility: Print an error message in a popup panel.(package private) static String
Returns System property "java.vm.specification.version"private static void
help()
Print synopsis of standard options(package private) static void
Utility: Internal error.(package private) static void
List runtime options.(package private) static int
optionDialog
(Object msg, String title, int optionType, int messageType, String... option) Brings up an option dialog.(package private) static void
popUpError
(String msg) Popup an error message box.(package private) static void
printError
(String msg) Print an error on the runtime console if present, otherwise on System.out(package private) static void
Print a line on the runtime console if present, otherwise on System.outprivate static boolean
printSimulaLineInfo
(StackTraceElement elt, String lead) Utility: Print SimulaLineInfo(package private) static void
printSimulaStackTrace
(int start) Utility: Print Simula stack trace.private static void
printSimulaStackTrace
(StackTraceElement[] stackTraceElement, int start) Utility: Print Simula StackTrace.(package private) static void
printSimulaStackTrace
(Throwable e, int start) Utility: Print Simula stack trace.(package private) static void
Print static chain starting with the current instance.(package private) static void
Print static chain starting with 'ins'(package private) static void
Print Thread list.(package private) static void
printThreadList
(boolean withStackTrace) Print Thread list.(package private) static void
printWarning
(String msg) Print a warning message on the runtime console if present, otherwise on System.outstatic void
setRuntimeOptions
(String[] args) Set runtime options.(package private) static void
TRACE Utility.
-
Field Details
-
console
The runtime console. May be null -
progamIdent
The program ident. -
currentModid
The current module ident. -
currentSimLine
static int currentSimLineThe current simula source line number. -
numberOfEditOverflows
static int numberOfEditOverflowsNumber of edit overflows.
-
-
Constructor Details
-
RTS_COMMON
private RTS_COMMON()Default constructor.
-
-
Method Details
-
setRuntimeOptions
Set runtime options.- Parameters:
args
- argument array
-
help
private static void help()Print synopsis of standard options -
error
Utility: Print an error message in a popup panel.- Parameters:
msg
- the error message
-
popUpError
Popup an error message box.- Parameters:
msg
- the error message
-
optionDialog
static int optionDialog(Object msg, String title, int optionType, int messageType, String... option) Brings up an option dialog.- Parameters:
msg
- the message to displaytitle
- the title string for the dialogoptionType
- an integer designating the options available on the dialogmessageType
- an integer designating the kind of message this isoption
- an array of objects indicating the possible choices the user can make- Returns:
- an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
-
listRuntimeOptions
static void listRuntimeOptions()List runtime options. -
println
Print a line on the runtime console if present, otherwise on System.out- Parameters:
msg
- the message to print
-
printError
Print an error on the runtime console if present, otherwise on System.out- Parameters:
msg
- the message to print
-
printWarning
Print a warning message on the runtime console if present, otherwise on System.out- Parameters:
msg
- the message to print
-
TRACE
TRACE Utility.- Parameters:
msg
- a trace message
-
IERR
Utility: Internal error.- Parameters:
msg
- an error message
-
getJavaID
Returns System property "java.vm.specification.version"- Returns:
- System property "java.vm.specification.version"
-
printStaticChain
static void printStaticChain()Print static chain starting with the current instance. -
printStaticChain
Print static chain starting with 'ins'- Parameters:
ins
- argument
-
printSimulaStackTrace
static void printSimulaStackTrace(int start) Utility: Print Simula stack trace.- Parameters:
start
- start index in Java stackTrace
-
printSimulaStackTrace
Utility: Print Simula stack trace.- Parameters:
e
- a Throwablestart
- start index in Java stackTrace
-
printSimulaStackTrace
Utility: Print Simula StackTrace.- Parameters:
stackTraceElement
- Java stackTracestart
- start index in Java stackTrace
-
printSimulaLineInfo
Utility: Print SimulaLineInfo- Parameters:
elt
- a StackTraceElementlead
- the keading string- Returns:
- the resulting line info
-
printThreadList
static void printThreadList()Print Thread list. -
printThreadList
static void printThreadList(boolean withStackTrace) Print Thread list.- Parameters:
withStackTrace
- argument
-
_LINE
Utility: Set current modid and Simula source line number.- Parameters:
modid
- new current modidsimLine
- new Simula source line number
-