BytecodeModule

class BytecodeModule(val manifest: JimManifest, val directory: Path, val runner: ByteCodeRunner) : JimModule

A module compiled to JVM bytecode by swc4j. Exported functions live on defaultClass as static methods; JIM looks them up (and caches a MethodHandle) when a trigger needs to call one.

Constructors

Link copied to clipboard
constructor(manifest: JimManifest, directory: Path, runner: ByteCodeRunner)

Properties

Link copied to clipboard

The swc4j default class $ containing the script's top-level (export function) methods.

Link copied to clipboard
open override val directory: Path
Link copied to clipboard
open override val exportedFunctions: List<String>

Names of the module's exported/callable functions.

Link copied to clipboard
open override val manifest: JimManifest
Link copied to clipboard
open val name: String
Link copied to clipboard
val runner: ByteCodeRunner

Functions

Link copied to clipboard
open override fun callbackFor(functionName: String): JimCallback?

A callable handle to an exported function, or null if it doesn't exist.

Link copied to clipboard
fun handleFor(functionName: String): MethodHandle?

Resolve (and cache) a callable handle for an exported function, or null if it doesn't exist.

Link copied to clipboard
open fun hasFunction(functionName: String): Boolean

Whether the module exports a callable function with this name.

Link copied to clipboard
fun parameterCount(functionName: String): Int