klyn.ClassLoader.loadSourceClass
method

    public static native loadSourceClass(sourceFilename as String, typeName as String) as Type throws Exception

Description

Compiles or reuses a cached Klyn source object, loads it into the active JIT and returns its declared entry type.

Parameters

Parameter | Description
--- | ---
`sourceFilename` | Source compile unit to load.
`typeName` | Fully qualified entry type declared by the source graph.

Returns

Reflected entry type.

Throws

- ClassNotFoundException if the entry type is not registered.
- Exception if compilation or JIT loading fails.

Example

    typeInfo = ClassLoader.loadSourceClass(
    "plugins/example/src/ExamplePlugin.kn",
    "ExamplePlugin"
    )