All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.jupyter.repl.EvaluatedSnippetMetadata.kt Maven / Gradle / Ivy

Go to download

Implementation of REPL compiler and preprocessor for Jupyter dialect of Kotlin (IDE-compatible)

There is a newer version: 0.12.0-290
Show newest version
package org.jetbrains.kotlinx.jupyter.repl

import kotlinx.serialization.Serializable
import org.jetbrains.kotlinx.jupyter.repl.result.Classpath
import org.jetbrains.kotlinx.jupyter.repl.result.InternalMetadata
import org.jetbrains.kotlinx.jupyter.repl.result.InternalMetadataImpl
import org.jetbrains.kotlinx.jupyter.repl.result.SerializedCompiledScriptsData

@Serializable
class EvaluatedSnippetMetadata private constructor(
    val newClasspath: Classpath,
    val newSources: Classpath,
    override val compiledData: SerializedCompiledScriptsData,
    override val newImports: List,
    val evaluatedVariablesState: Map,
) : InternalMetadata {
    constructor(
        newClasspath: Classpath = emptyList(),
        newSources: Classpath = emptyList(),
        internalMetadata: InternalMetadata = InternalMetadataImpl(),
        evaluatedVariablesState: Map = mutableMapOf(),
    ) :
        this(
            newClasspath,
            newSources,
            internalMetadata.compiledData,
            internalMetadata.newImports,
            evaluatedVariablesState,
        )

    companion object {
        val EMPTY = EvaluatedSnippetMetadata()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy