Application
classin packageklyn
public class Application:
Global runtime entry point exposed by default in every Klyn program.
Static members can be used with or without the `Application.` prefix.
Application.print( "ok" )
print( "ok" )
Fields
| Modifier and Type |
Member |
Description |
| public static readonly |
EXIT_FAILURE |
Conventional failure exit code (`-1`). |
| public static readonly |
EXIT_SUCCESS |
Conventional success exit code (`0`). |
| public static native |
arguments |
Command-line arguments passed to the program. |
| public static native |
environmentVariables |
Environment variables of the current process. |
| public static native readonly |
err |
Standard error stream of the process. |
| public static native readonly |
in |
Standard input stream of the process. |
| public static native readonly |
out |
Standard output stream of the process. |
| public static native readonly |
pid |
Process identifier of the current runtime. |
| public static native |
properties |
System properties exposed by the runtime. |
Properties
| Modifier and Type |
Member |
Description |
| public static readonly property |
classLoader |
Returns the runtime system class loader. |
Methods
| Modifier and Type |
Member |
Description |
| public static native |
compile |
Compiles a Klyn script provided as a string. |
| public static native |
currentTimeMilliscurrentTimeMillis() as ULong |
Returns the current time in milliseconds since the Unix epoch. |
| public static native |
eval |
Compiles and executes a Klyn script provided as a string. |
| public static native |
exit |
Terminates the current process. |
| public static native |
input |
Reads a line from the given input stream, after optionally printing a prompt. |
| public static native |
print |
Prints one or more values to the given output stream. |
| public static |
sumsum<T>(values as IList<T>) as T: |
Returns the sum of all numeric values from a read-only list. |
| public static |
sumsum<T>(values as Set<T>) as T: |
Returns the sum of all numeric values from a set. |
| public static |
sum |
Returns the sum of all numeric values from an NDArray. |
| public static native |
type |
Returns the runtime type of a value. |