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

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

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

import org.jetbrains.kotlinx.jupyter.api.libraries.LibraryResource
import org.jetbrains.kotlinx.jupyter.api.libraries.ResourceType
import java.util.EnumMap

class LibraryResourcesProcessorImpl : LibraryResourcesProcessor {
    private val processorMap = EnumMap(ResourceType::class.java)

    init {
        processorMap[ResourceType.JS] = JsLibraryResourcesProcessor()
        processorMap[ResourceType.CSS] = CssLibraryResourcesProcessor()
    }

    override fun wrapLibrary(resource: LibraryResource, classLoader: ClassLoader): String {
        return processorMap.getValue(resource.type).wrapLibrary(resource, classLoader)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy