KotlinKernelHost

Interface representing kernel engine, the core facility for compiling and executing code snippets

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun acceptsIntegrationTypeName(typeName: String): Boolean?

Says whether this typeName should be loaded as integration based on loaded libraries. null means that loaded libraries don't care about this typeName.

Link copied to clipboard
abstract fun addLibraries(libraries: Collection<LibraryDefinition>)

Adds new libraries via their definition. Fully interchangeable with %use approach

Link copied to clipboard
open fun addLibrary(library: LibraryDefinition)
Link copied to clipboard
abstract fun declare(variables: Iterable<VariableDeclaration>)

Declares global variables for notebook

Link copied to clipboard
Link copied to clipboard
open fun display(value: Any)
abstract fun display(value: Any, id: String? = null)

Try to display the given value. It is only displayed if it's an instance of Renderable or may be converted to it

Link copied to clipboard
abstract fun execute(code: Code): FieldValue

Executes code immediately. Note that it may lead to breaking the kernel state in some cases

abstract fun <T> execute(callback: ExecutionCallback<T>): T
Link copied to clipboard
abstract fun loadKotlinArtifacts(artifacts: Collection<String>, version: String? = null)

Loads Kotlin standard artifacts (org.jetbrains.kotlin:kotlin-$name:$version)

Link copied to clipboard
abstract fun loadStdlibJdkExtensions(version: String? = null)

Loads Kotlin standard library extensions for a current JDK

Link copied to clipboard
abstract fun scheduleExecution(execution: ExecutionCallback<*>)

Schedules execution of the given execution after the completing of execution of the current cell

open fun scheduleExecution(execution: Code)
Link copied to clipboard
abstract fun updateDisplay(value: Any, id: String? = null)

Updates display data with given id with the new value