public class ClassLoader:
Class loader abstraction.
The runtime exposes a system loader responsible for resolving classes and packages.
Class search order is fixed by the runtime for predictability and security: first the standard library located under $KLYN_HOME/lib, then the directory containing the startup .kn file, then the entries declared in $KLASSPATH, and finally the current working directory if it is distinct from the startup directory. Standard library classes therefore cannot be shadowed by local application files.
| Modifier and Type | Member | Description |
|---|---|---|
| public static readonly property | systemsystem as SystemClassLoader: |
Returns the system class loader of the current runtime. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | forName | Loads a class by its fully qualified name using the system loader. |
| public static native | getSystemgetSystem() as SystemClassLoader |
Returns the runtime system class loader. |
| public static native | getTypeByName | Resolves a type by name using the runtime facilities. |
| public abstract | loadClass | Loads a class by name and returns its Type. |
| public abstract | loadPackageloadPackage(name as String) as Void |
Loads a package by name (if supported by the runtime). |