AbstractEngine

abstract class AbstractEngine : Closeable

Abstract base class that wraps a JSR 223 ScriptEngine, resolved by file extension or created by the subclass.

Subclasses usually specify the script language via the extension constructor parameter (e.g., "kts" for Kotlin, "py" for Python, "java" for Java). One that needs an engine the extension lookup cannot give it, such as a subclass of the registered engine, passes the engine itself instead.

Inheritors

Constructors

Link copied to clipboard
constructor(extension: String)

Wraps the engine registered for extension.

Properties

Link copied to clipboard

The underlying JSR 223 script engine for this extension.

Functions

Link copied to clipboard
open override fun close()

Releases resources held by the engine. The default does nothing; engines that hold resources override it.