Package-level declarations

Types

Link copied to clipboard
open class BoundKernelParameter<T : Any>(val parameter: KernelParameter<T>, val valueProvider: () -> T?)

Class that binds a parameter handler to a value provider function. This allows for serializing parameter values without directly accessing the storage mechanism.

Link copied to clipboard
class KernelArgumentsBuilder(ownParamsBuilder: KernelOwnParamsBuilder = KernelOwnParamsBuilder(), cfgFile: File? = null)
Link copied to clipboard
class KernelOwnParams(val scriptClasspath: List<File> = emptyList(), val homeDir: File?, val debugPort: Int? = null, val clientType: String? = null, val jvmTargetForSnippets: String? = null, val replCompilerMode: ReplCompilerMode = ReplCompilerMode.DEFAULT, val extraCompilerArguments: List<String> = emptyList())

To add a new kernel argument:

Link copied to clipboard
class KernelOwnParamsBuilder(var scriptClasspath: List<File>? = null, var homeDir: File? = null, var debugPort: Int? = null, var clientType: String? = null, var jvmTargetForSnippets: String? = null, var replCompilerMode: ReplCompilerMode? = null, var extraCompilerArguments: List<String>? = null)
Link copied to clipboard
interface KernelParameter<T>

Interface for handling the parsing and serialization of a specific kernel parameter type.

Link copied to clipboard
class MutableBoundKernelParameter<T : Any>(parameter: KernelParameter<T>, val valueUpdater: (T?) -> Unit, val valueProvider: () -> T?) : BoundKernelParameter<T>

Class that extends BoundKernelParameter with the ability to update the parameter value. This allows for both parsing and serializing parameter values.

Link copied to clipboard
abstract class NamedKernelParameter<T : Any>(val aliases: List<String>) : KernelParameter<T>

Abstract base class for named kernel parameters that follow the format "-name=value". Provides a common implementation for parsing and serializing named parameters.

Link copied to clipboard

A simple implementation of a named kernel parameter that handles integer values.

Link copied to clipboard
abstract class SimpleNamedKernelParameter<T : Any>(val name: String, valueParser: (String, T?) -> T, valueSerializer: (T) -> String = { it.toString() }) : NamedKernelParameter<T>
Link copied to clipboard

Represents a simple named kernel parameter with a string value. This parameter is identified by a single alias provided via the name property. It inherits functionality to parse and serialize command-line arguments in the format "-name=value".

Properties

Link copied to clipboard

Parameter handler for the client type. Specifies the type of client that is connecting to the kernel.

Link copied to clipboard

Parameter handler for the configuration file path. This is a positional parameter (not prefixed with a name) that specifies the path to the configuration file.

Link copied to clipboard

Parameter handler for the debug port. Specifies the port number to use for remote debugging of the kernel.

Link copied to clipboard

Parameter handler for additional compiler arguments. Specifies extra arguments to pass to the Kotlin compiler when compiling snippets. Can't be specified twice in the command line.

Link copied to clipboard

Parameter handler for the kernel home directory. Specifies the base directory where the kernel will look for resources and configurations.

Link copied to clipboard

Parameter handler for the JVM target version. Specifies the target JVM version for compiled snippets (e.g., "1.8", "11", "17").

Link copied to clipboard

Parameter handler for the REPL compiler mode. Specifies the compilation mode to use for the REPL.

Link copied to clipboard

Parameter handler for the classpath entries. Accepts multiple path entries separated by the platform-specific path separator.

Functions

Link copied to clipboard

Parses an array of command-line arguments using the provided parameter handlers. For each argument, tries each parameter handler in order until one successfully parses it.

Link copied to clipboard

Serializes kernel parameters into a list of command-line arguments. Each parameter is serialized only if it has a non-null value.