ClassLoader
class in package klyn

    public class ClassLoader:

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.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public static readonly property | system `system as SystemClassLoader:` | Returns the system class loader of the current runtime.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public static | forName `forName(name as String) as Type:` | Loads a class by its fully qualified name using the system loader.
public static native | getSystem `getSystem() as SystemClassLoader` | Returns the runtime system class loader.
public static native | getTypeByName `getTypeByName(name as String) as Type` | Resolves a type by name using the runtime facilities.
public abstract | loadClass `loadClass(name as String) as Type` | Loads a class by name and returns its Type.
public abstract | loadPackage `loadPackage(name as String) as Void` | Loads a package by name (if supported by the runtime).