org.jetbrains.kotlinx.jupyter.repl.EvaluatedSnippetMetadata.kt Maven / Gradle / Ivy
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()
}
}