klyn.ClassLoader.loadObjectBundle
method

    public static native loadObjectBundle(
    objectFilenames as ArrayList<String>,
    sourceFilenames as ArrayList<String>,
    typeName as String
    ) as Type throws Exception

Description

Loads a platform-native Klyn object bundle into the active JIT.

Every object is added before metadata registration so plugin classes may reference one another independently of archive order.

Parameters

Parameter | Description
--- | ---
`objectFilenames` | Native object files belonging to one plugin.
`sourceFilenames` | Stable source identities parallel to the objects. These relative paths prevent transitive dependency loading from adding a second cached object for a class already supplied by the bundle.
`typeName` | Fully qualified plugin entry type.

Returns

Reflected entry type.

Throws

- ClassNotFoundException if the entry type is not registered.
- Exception if an object is incompatible or cannot be loaded.

Example

    typeInfo = ClassLoader.loadObjectBundle(
    ["cache/example/objects/ExamplePlugin.o"],
    ["plugins/example/src/ExamplePlugin.kn"],
    "ExamplePlugin"
    )