-
- All Implemented Interfaces:
-
org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinition
public final class LibraryDefinitionImpl implements LibraryDefinition
Trivial implementation of LibraryDefinition. You may use it in simple cases instead of overriding LibraryDefinition to avoid additional anonymous classes creation
-
-
Field Summary
Fields Modifier and Type Field Description private final List<String>
dependencies
private final List<String>
repositories
private final List<String>
imports
private final List<Function1<KotlinKernelHost, ?>>
init
private final List<Function1<KotlinKernelHost, ?>>
initCell
private final List<Function3<KotlinKernelHost, Object, FieldValue, Unit>>
afterCellExecution
private final List<Function1<KotlinKernelHost, ?>>
shutdown
private final List<RendererTypeHandler>
renderers
private final List<FieldHandler>
converters
private final List<ClassAnnotationHandler>
classAnnotations
private final List<FileAnnotationHandler>
fileAnnotations
private final List<LibraryResource>
resources
private final KotlinKernelVersion
minKernelVersion
private final String
originalDescriptorText
-
Constructor Summary
Constructors Constructor Description LibraryDefinitionImpl(List<String> dependencies, List<String> repositories, List<String> imports, List<Function1<KotlinKernelHost, ?>> init, List<Function1<KotlinKernelHost, ?>> initCell, List<Function3<KotlinKernelHost, Object, FieldValue, Unit>> afterCellExecution, List<Function1<KotlinKernelHost, ?>> shutdown, List<RendererTypeHandler> renderers, List<FieldHandler> converters, List<ClassAnnotationHandler> classAnnotations, List<FileAnnotationHandler> fileAnnotations, List<LibraryResource> resources, KotlinKernelVersion minKernelVersion, String originalDescriptorText)
-
Method Summary
Modifier and Type Method Description List<String>
getDependencies()
List of artifact dependencies in gradle colon-separated format List<String>
getRepositories()
List of repository URLs to resolve dependencies in List<String>
getImports()
List of imports: simple and star imports are both allowed List<Function1<KotlinKernelHost, ?>>
getInit()
List of code snippets evaluated on library initialization List<Function1<KotlinKernelHost, ?>>
getInitCell()
List of code snippets evaluated before every cell evaluation List<Function3<KotlinKernelHost, Object, FieldValue, Unit>>
getAfterCellExecution()
List of callbacks called after cell evaluation List<Function1<KotlinKernelHost, ?>>
getShutdown()
List of code snippets evaluated on kernel shutdown List<RendererTypeHandler>
getRenderers()
List of type renderers. List<FieldHandler>
getConverters()
List of type converters used by type providers processors List<ClassAnnotationHandler>
getClassAnnotations()
List of type annotations used by annotations processor List<FileAnnotationHandler>
getFileAnnotations()
List of file annotation handlers List<LibraryResource>
getResources()
List of library resources KotlinKernelVersion
getMinKernelVersion()
Minimal kernel version that is supported by this library String
getOriginalDescriptorText()
Original descriptor text, or null if it has non-textual nature -
-
Constructor Detail
-
LibraryDefinitionImpl
LibraryDefinitionImpl(List<String> dependencies, List<String> repositories, List<String> imports, List<Function1<KotlinKernelHost, ?>> init, List<Function1<KotlinKernelHost, ?>> initCell, List<Function3<KotlinKernelHost, Object, FieldValue, Unit>> afterCellExecution, List<Function1<KotlinKernelHost, ?>> shutdown, List<RendererTypeHandler> renderers, List<FieldHandler> converters, List<ClassAnnotationHandler> classAnnotations, List<FileAnnotationHandler> fileAnnotations, List<LibraryResource> resources, KotlinKernelVersion minKernelVersion, String originalDescriptorText)
-
-
Method Detail
-
getDependencies
List<String> getDependencies()
List of artifact dependencies in gradle colon-separated format
-
getRepositories
List<String> getRepositories()
List of repository URLs to resolve dependencies in
-
getImports
List<String> getImports()
List of imports: simple and star imports are both allowed
-
getInit
List<Function1<KotlinKernelHost, ?>> getInit()
List of code snippets evaluated on library initialization
-
getInitCell
List<Function1<KotlinKernelHost, ?>> getInitCell()
List of code snippets evaluated before every cell evaluation
-
getAfterCellExecution
List<Function3<KotlinKernelHost, Object, FieldValue, Unit>> getAfterCellExecution()
List of callbacks called after cell evaluation
-
getShutdown
List<Function1<KotlinKernelHost, ?>> getShutdown()
List of code snippets evaluated on kernel shutdown
-
getRenderers
List<RendererTypeHandler> getRenderers()
List of type renderers. Consider using org.jetbrains.kotlinx.jupyter.api.Renderable as it's generally more convenient
-
getConverters
List<FieldHandler> getConverters()
List of type converters used by type providers processors
-
getClassAnnotations
List<ClassAnnotationHandler> getClassAnnotations()
List of type annotations used by annotations processor
-
getFileAnnotations
List<FileAnnotationHandler> getFileAnnotations()
List of file annotation handlers
-
getResources
List<LibraryResource> getResources()
List of library resources
-
getMinKernelVersion
KotlinKernelVersion getMinKernelVersion()
Minimal kernel version that is supported by this library
-
getOriginalDescriptorText
String getOriginalDescriptorText()
Original descriptor text, or null if it has non-textual nature
-
-
-
-