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

org.jetbrains.kotlinx.jupyter.libraries.EmptyResolutionInfoProvider.kt Maven / Gradle / Ivy

Go to download

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

The newest version!
package org.jetbrains.kotlinx.jupyter.libraries

import org.jetbrains.kotlinx.jupyter.api.libraries.LibraryResolutionInfo

class EmptyResolutionInfoProvider(
    private val libraryInfoCache: LibraryInfoCache,
) : ResolutionInfoProvider {
    override var fallback: LibraryResolutionInfo
        get() = ByNothingLibraryResolutionInfo
        set(_) {}

    override fun get(string: String): LibraryResolutionInfo {
        if (string.isEmpty()) return fallback
        return libraryInfoCache.getLibraryInfoByRef(string)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy