refactor to kotlin 1.5

This commit is contained in:
Alexander Nozik 2021-04-27 10:55:58 +03:00
parent a7ecbfb763
commit 5afe0523f1
11 changed files with 163 additions and 188 deletions

View File

@ -13,6 +13,8 @@
- Scheme made observable
- Global context is a variable (the singleton is hidden and will be deprecated in future)
- Kotlin 1.5
- Added blank builders for children context.
- Refactor loggers
### Deprecated
- Direct use of PluginManager

View File

@ -4,7 +4,7 @@ plugins {
allprojects {
group = "space.kscience"
version = "0.4.0-dev-8"
version = "0.4.0"
}
subprojects {

View File

@ -3,17 +3,12 @@ public abstract class space/kscience/dataforge/context/AbstractPlugin : space/ks
public fun <init> (Lspace/kscience/dataforge/meta/Meta;)V
public synthetic fun <init> (Lspace/kscience/dataforge/meta/Meta;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun attach (Lspace/kscience/dataforge/context/Context;)V
public fun content (Ljava/lang/String;)Ljava/util/Map;
public final fun dependsOn ()Ljava/util/Map;
public fun detach ()V
public fun getContext ()Lspace/kscience/dataforge/context/Context;
public fun getDefaultChainTarget ()Ljava/lang/String;
public fun getDefaultTarget ()Ljava/lang/String;
public fun getMeta ()Lspace/kscience/dataforge/meta/Meta;
public fun getName ()Lspace/kscience/dataforge/names/Name;
protected final fun require (Lspace/kscience/dataforge/context/PluginFactory;Lspace/kscience/dataforge/meta/Meta;)Lkotlin/properties/ReadOnlyProperty;
public static synthetic fun require$default (Lspace/kscience/dataforge/context/AbstractPlugin;Lspace/kscience/dataforge/context/PluginFactory;Lspace/kscience/dataforge/meta/Meta;ILjava/lang/Object;)Lkotlin/properties/ReadOnlyProperty;
public fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
}
public final class space/kscience/dataforge/context/AbstractPluginKt {
@ -44,7 +39,6 @@ public class space/kscience/dataforge/context/Context : kotlinx/coroutines/Corou
public fun content (Ljava/lang/String;)Ljava/util/Map;
public final fun content (Ljava/lang/String;Z)Ljava/util/Map;
public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext;
public fun getDefaultChainTarget ()Ljava/lang/String;
public fun getDefaultTarget ()Ljava/lang/String;
public final fun getName ()Lspace/kscience/dataforge/names/Name;
public final fun getParent ()Lspace/kscience/dataforge/context/Context;
@ -83,8 +77,9 @@ public final class space/kscience/dataforge/context/ContextBuilderKt {
public final class space/kscience/dataforge/context/DefaultLogManager : space/kscience/dataforge/context/AbstractPlugin, space/kscience/dataforge/context/LogManager {
public static final field Companion Lspace/kscience/dataforge/context/DefaultLogManager$Companion;
public fun <init> ()V
public fun getDefaultLogger ()Lspace/kscience/dataforge/context/Logger;
public fun getTag ()Lspace/kscience/dataforge/context/PluginTag;
public fun log (Lspace/kscience/dataforge/names/Name;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
public fun logger (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/context/Logger;
}
public final class space/kscience/dataforge/context/DefaultLogManager$Companion : space/kscience/dataforge/context/PluginFactory {
@ -96,9 +91,6 @@ public final class space/kscience/dataforge/context/DefaultLogManager$Companion
public abstract interface class space/kscience/dataforge/context/Factory {
public abstract fun invoke (Lspace/kscience/dataforge/meta/Meta;Lspace/kscience/dataforge/context/Context;)Ljava/lang/Object;
}
public final class space/kscience/dataforge/context/Factory$DefaultImpls {
public static synthetic fun invoke$default (Lspace/kscience/dataforge/context/Factory;Lspace/kscience/dataforge/meta/Meta;Lspace/kscience/dataforge/context/Context;ILjava/lang/Object;)Ljava/lang/Object;
}
@ -108,13 +100,17 @@ public final class space/kscience/dataforge/context/GlobalKt {
public static final fun getGlobal ()Lspace/kscience/dataforge/context/Context;
}
public abstract interface class space/kscience/dataforge/context/LogManager : space/kscience/dataforge/context/Logable, space/kscience/dataforge/context/Plugin {
public abstract interface class space/kscience/dataforge/context/LogManager : space/kscience/dataforge/context/Logger, space/kscience/dataforge/context/Plugin {
public static final field Companion Lspace/kscience/dataforge/context/LogManager$Companion;
public static final field DEBUG Ljava/lang/String;
public static final field ERROR Ljava/lang/String;
public static final field INFO Ljava/lang/String;
public static final field TRACE Ljava/lang/String;
public static final field WARNING Ljava/lang/String;
public abstract fun getDefaultLogger ()Lspace/kscience/dataforge/context/Logger;
public fun log (Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
public fun log (Lspace/kscience/dataforge/names/Name;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
public abstract fun logger (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/context/Logger;
}
public final class space/kscience/dataforge/context/LogManager$Companion {
@ -125,33 +121,19 @@ public final class space/kscience/dataforge/context/LogManager$Companion {
public static final field WARNING Ljava/lang/String;
}
public final class space/kscience/dataforge/context/LogManager$DefaultImpls {
public static fun content (Lspace/kscience/dataforge/context/LogManager;Ljava/lang/String;)Ljava/util/Map;
public static fun getDefaultChainTarget (Lspace/kscience/dataforge/context/LogManager;)Ljava/lang/String;
public static fun getDefaultTarget (Lspace/kscience/dataforge/context/LogManager;)Ljava/lang/String;
public static fun getName (Lspace/kscience/dataforge/context/LogManager;)Lspace/kscience/dataforge/names/Name;
public static fun toMeta (Lspace/kscience/dataforge/context/LogManager;)Lspace/kscience/dataforge/meta/Meta;
}
public final class space/kscience/dataforge/context/LogManagerKt {
public static final fun debug (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun debug$default (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public static final fun error (Lspace/kscience/dataforge/context/Logable;Ljava/lang/Throwable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;)V
public static final fun error (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun error$default (Lspace/kscience/dataforge/context/Logable;Ljava/lang/Throwable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public static synthetic fun error$default (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public static final fun getLogger (Lspace/kscience/dataforge/context/Context;)Lspace/kscience/dataforge/context/Logable;
public static final fun getLogger (Lspace/kscience/dataforge/context/ContextAware;)Lspace/kscience/dataforge/context/Logable;
public static final fun info (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun info$default (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public static final fun trace (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun trace$default (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public static final fun warn (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun warn$default (Lspace/kscience/dataforge/context/Logable;Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public static final fun debug (Lspace/kscience/dataforge/context/Logger;Lkotlin/jvm/functions/Function0;)V
public static final fun error (Lspace/kscience/dataforge/context/Logger;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static final fun error (Lspace/kscience/dataforge/context/Logger;Lkotlin/jvm/functions/Function0;)V
public static final fun getLogger (Lspace/kscience/dataforge/context/Context;)Lspace/kscience/dataforge/context/LogManager;
public static final fun getLogger (Lspace/kscience/dataforge/context/ContextAware;)Lspace/kscience/dataforge/context/Logger;
public static final fun info (Lspace/kscience/dataforge/context/Logger;Lkotlin/jvm/functions/Function0;)V
public static final fun trace (Lspace/kscience/dataforge/context/Logger;Lkotlin/jvm/functions/Function0;)V
public static final fun warn (Lspace/kscience/dataforge/context/Logger;Lkotlin/jvm/functions/Function0;)V
}
public abstract interface class space/kscience/dataforge/context/Logable {
public abstract fun log (Lspace/kscience/dataforge/names/Name;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
public abstract interface class space/kscience/dataforge/context/Logger {
public abstract fun log (Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
}
public abstract interface class space/kscience/dataforge/context/Plugin : space/kscience/dataforge/context/ContextAware, space/kscience/dataforge/meta/MetaRepr, space/kscience/dataforge/misc/Named, space/kscience/dataforge/provider/Provider {
@ -161,23 +143,15 @@ public abstract interface class space/kscience/dataforge/context/Plugin : space/
public abstract fun dependsOn ()Ljava/util/Map;
public abstract fun detach ()V
public abstract fun getMeta ()Lspace/kscience/dataforge/meta/Meta;
public abstract fun getName ()Lspace/kscience/dataforge/names/Name;
public fun getName ()Lspace/kscience/dataforge/names/Name;
public abstract fun getTag ()Lspace/kscience/dataforge/context/PluginTag;
public abstract fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
public fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
}
public final class space/kscience/dataforge/context/Plugin$Companion {
public static final field TARGET Ljava/lang/String;
}
public final class space/kscience/dataforge/context/Plugin$DefaultImpls {
public static fun content (Lspace/kscience/dataforge/context/Plugin;Ljava/lang/String;)Ljava/util/Map;
public static fun getDefaultChainTarget (Lspace/kscience/dataforge/context/Plugin;)Ljava/lang/String;
public static fun getDefaultTarget (Lspace/kscience/dataforge/context/Plugin;)Ljava/lang/String;
public static fun getName (Lspace/kscience/dataforge/context/Plugin;)Lspace/kscience/dataforge/names/Name;
public static fun toMeta (Lspace/kscience/dataforge/context/Plugin;)Lspace/kscience/dataforge/meta/Meta;
}
public abstract interface class space/kscience/dataforge/context/PluginFactory : space/kscience/dataforge/context/Factory {
public static final field Companion Lspace/kscience/dataforge/context/PluginFactory$Companion;
public static final field TYPE Ljava/lang/String;
@ -242,8 +216,9 @@ public final class space/kscience/dataforge/context/ResolveKt {
public final class space/kscience/dataforge/context/SlfLogManager : space/kscience/dataforge/context/AbstractPlugin, space/kscience/dataforge/context/LogManager {
public static final field Companion Lspace/kscience/dataforge/context/SlfLogManager$Companion;
public fun <init> ()V
public fun getDefaultLogger ()Lspace/kscience/dataforge/context/Logger;
public fun getTag ()Lspace/kscience/dataforge/context/PluginTag;
public fun log (Lspace/kscience/dataforge/names/Name;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
public fun logger (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/context/Logger;
}
public final class space/kscience/dataforge/context/SlfLogManager$Companion : space/kscience/dataforge/context/PluginFactory {
@ -275,11 +250,6 @@ public abstract interface annotation class space/kscience/dataforge/descriptors/
public abstract fun type ()[Lspace/kscience/dataforge/values/ValueType;
}
public final class space/kscience/dataforge/properties/Property$DefaultImpls {
public static synthetic fun onChange$default (Lspace/kscience/dataforge/properties/Property;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static synthetic fun removeChangeListener$default (Lspace/kscience/dataforge/properties/Property;Ljava/lang/Object;ILjava/lang/Object;)V
}
public final class space/kscience/dataforge/properties/PropertyKt {
}
@ -345,15 +315,9 @@ public final class space/kscience/dataforge/provider/PathToken$Companion {
}
public abstract interface class space/kscience/dataforge/provider/Provider {
public abstract fun content (Ljava/lang/String;)Ljava/util/Map;
public abstract fun getDefaultChainTarget ()Ljava/lang/String;
public abstract fun getDefaultTarget ()Ljava/lang/String;
}
public final class space/kscience/dataforge/provider/Provider$DefaultImpls {
public static fun content (Lspace/kscience/dataforge/provider/Provider;Ljava/lang/String;)Ljava/util/Map;
public static fun getDefaultChainTarget (Lspace/kscience/dataforge/provider/Provider;)Ljava/lang/String;
public static fun getDefaultTarget (Lspace/kscience/dataforge/provider/Provider;)Ljava/lang/String;
public fun content (Ljava/lang/String;)Ljava/util/Map;
public fun getDefaultChainTarget ()Ljava/lang/String;
public fun getDefaultTarget ()Ljava/lang/String;
}
public final class space/kscience/dataforge/provider/ProviderKt {

View File

@ -76,7 +76,7 @@ public open class Context internal constructor(
* Build and register a child context
*/
@Synchronized
public fun buildContext(name: String? = null, block: ContextBuilder.() -> Unit): Context {
public fun buildContext(name: String? = null, block: ContextBuilder.() -> Unit = {}): Context {
val newContext = ContextBuilder(this)
.apply { name?.let { name(it) } }
.apply(block)

View File

@ -6,11 +6,19 @@ import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.plus
import kotlin.reflect.KClass
public fun interface Logable {
public fun log(name: Name, tag: String, body: () -> String)
public fun interface Logger {
public fun log(tag: String, body: () -> String)
}
public interface LogManager : Plugin, Logable {
public interface LogManager : Plugin, Logger {
public fun logger(name: Name): Logger
public val defaultLogger: Logger
override fun log(tag: String, body: () -> String): Unit = defaultLogger.log(tag, body)
public fun log(name: Name, tag: String, body: () -> String): Unit = logger(name).log(tag, body)
public companion object {
public const val TRACE: String = "TRACE"
public const val INFO: String = "INFO"
@ -20,11 +28,11 @@ public interface LogManager : Plugin, Logable {
}
}
public fun Logable.trace(name: Name = Name.EMPTY, body: () -> String): Unit = log(name, LogManager.TRACE, body)
public fun Logable.info(name: Name = Name.EMPTY, body: () -> String): Unit = log(name, LogManager.INFO, body)
public fun Logable.debug(name: Name = Name.EMPTY, body: () -> String): Unit = log(name, LogManager.DEBUG, body)
public fun Logable.warn(name: Name = Name.EMPTY, body: () -> String): Unit = log(name, LogManager.WARNING, body)
public fun Logable.error(name: Name = Name.EMPTY, body: () -> String): Unit = log(name, LogManager.ERROR, body)
public fun Logger.trace(body: () -> String): Unit = log(LogManager.TRACE, body)
public fun Logger.info(body: () -> String): Unit = log(LogManager.INFO, body)
public fun Logger.debug(body: () -> String): Unit = log(LogManager.DEBUG, body)
public fun Logger.warn(body: () -> String): Unit = log(LogManager.WARNING, body)
public fun Logger.error(body: () -> String): Unit = log(LogManager.ERROR, body)
internal val (() -> String).safe: String
get() = try {
@ -34,22 +42,24 @@ internal val (() -> String).safe: String
}
public fun Logable.error(throwable: Throwable?, name: Name = Name.EMPTY, body: () -> String): Unit =
log(name, LogManager.ERROR) {
public fun Logger.error(throwable: Throwable?, body: () -> String): Unit = log(LogManager.ERROR) {
buildString {
appendLine(body())
throwable?.let { appendLine(throwable.stackTraceToString()) }
}
}
}
public class DefaultLogManager : AbstractPlugin(), LogManager {
override fun log(name: Name, tag: String, body: () -> String) {
override fun logger(name: Name): Logger = Logger { tag, body ->
val message: String = body.safe
println("[${context.name}] $name: $message")
println("$tag $name: [${context.name}] $message")
}
override val defaultLogger: Logger = logger(Name.EMPTY)
override val tag: PluginTag get() = Companion.tag
public companion object : PluginFactory<DefaultLogManager> {
@ -63,20 +73,17 @@ public class DefaultLogManager : AbstractPlugin(), LogManager {
/**
* Context log manager inherited from parent
*/
public val Context.logger: Logable
public val Context.logger: LogManager
get() = plugins.find(inherit = true) { it is LogManager } as? LogManager
?: globalLoggerFactory(context = Global).apply { attach(Global) }
/**
* The named proxy logger for a context member
*/
public val ContextAware.logger: Logable
public val ContextAware.logger: Logger
get() = if (this is Named) {
object : Logable {
val contextLog = context.logger
override fun log(name: Name, tag: String, body: () -> String) {
contextLog.log(this@logger.name + name, tag, body)
}
Logger { tag, body ->
context.logger.log(this@logger.name + name, tag, body)
}
} else {
context.logger

View File

@ -6,7 +6,7 @@ import kotlin.reflect.KClass
public class ConsoleLogManager : AbstractPlugin(), LogManager {
override fun log(name: Name, tag: String, body: () -> String) {
override fun logger(name: Name): Logger = Logger { tag, body ->
val message: String = body.safe
when (tag) {
LogManager.INFO -> console.info("[${context.name}] $name: $message")
@ -16,6 +16,9 @@ public class ConsoleLogManager : AbstractPlugin(), LogManager {
}
}
override val defaultLogger: Logger = logger(Name.EMPTY)
override val tag: PluginTag get() = Companion.tag
public companion object : PluginFactory<ConsoleLogManager> {

View File

@ -7,7 +7,7 @@ import kotlin.reflect.KClass
public class SlfLogManager : AbstractPlugin(), LogManager {
override fun log(name: Name, tag: String, body: () -> String) {
override fun logger(name: Name): Logger = Logger { tag, body ->
val logger = LoggerFactory.getLogger("[${context.name}] $name") //KotlinLogging.logger("[${context.name}] $name")
val message = body.safe
when (tag) {
@ -19,6 +19,8 @@ public class SlfLogManager : AbstractPlugin(), LogManager {
}
}
override val defaultLogger: Logger = logger(Name.EMPTY)
override val tag: PluginTag get() = Companion.tag
public companion object : PluginFactory<SlfLogManager> {

View File

@ -48,9 +48,9 @@ public val CoroutineScope.monitor: CoroutineMonitor? get() = coroutineContext.mo
public val Job.dependencies: Collection<Job> get() = this[Dependencies]?.values ?: emptyList()
@DFExperimental
public val Job.totalWork: Double get() = dependencies.sumByDouble { totalWork } + (monitor?.totalWork ?: 0.0)
public val Job.totalWork: Double get() = dependencies.sumOf { totalWork } + (monitor?.totalWork ?: 0.0)
@DFExperimental
public val Job.workDone: Double get() = dependencies.sumByDouble { workDone } + (monitor?.workDone ?: 0.0)
public val Job.workDone: Double get() = dependencies.sumOf { workDone } + (monitor?.workDone ?: 0.0)
@DFExperimental
public val Job.status: String get() = monitor?.status ?: ""
@DFExperimental

View File

@ -20,7 +20,7 @@ public object BinaryMetaFormat : MetaFormat, MetaFormatFactory {
return (input.readMetaItem() as MetaItemNode).node
}
private fun Output.writeChar(char: Char) = writeByte(char.toByte())
private fun Output.writeChar(char: Char) = writeByte(char.code.toByte())
private fun Output.writeString(str: String) {
writeInt(str.length)
@ -101,7 +101,7 @@ public object BinaryMetaFormat : MetaFormat, MetaFormatFactory {
@Suppress("UNCHECKED_CAST")
public fun Input.readMetaItem(): TypedMetaItem<MetaBuilder> {
return when (val keyChar = readByte().toChar()) {
return when (val keyChar = readByte().toInt().toChar()) {
'S' -> MetaItemValue(StringValue(readString()))
'N' -> MetaItemValue(Null)
'+' -> MetaItemValue(True)

View File

@ -9,7 +9,6 @@ public abstract class space/kscience/dataforge/meta/AbstractMutableMeta : space/
public abstract class space/kscience/dataforge/meta/AbstractTypedMeta : space/kscience/dataforge/meta/MetaBase, space/kscience/dataforge/meta/TypedMeta {
public fun <init> ()V
public fun getItem (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
}
public final class space/kscience/dataforge/meta/Config : space/kscience/dataforge/meta/AbstractMutableMeta, space/kscience/dataforge/meta/ItemPropertyProvider {
@ -33,6 +32,8 @@ public final class space/kscience/dataforge/meta/Config$ConfigSerializer : kotli
public final class space/kscience/dataforge/meta/ConfigKt {
public static final fun asConfig (Lspace/kscience/dataforge/meta/Meta;)Lspace/kscience/dataforge/meta/Config;
public static final fun copy (Lspace/kscience/dataforge/meta/Config;Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/Config;
public static synthetic fun copy$default (Lspace/kscience/dataforge/meta/Config;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lspace/kscience/dataforge/meta/Config;
public static final fun get (Lspace/kscience/dataforge/meta/Config;Lspace/kscience/dataforge/names/NameToken;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public static final fun toConfig (Lspace/kscience/dataforge/meta/Meta;)Lspace/kscience/dataforge/meta/Config;
}
@ -172,10 +173,10 @@ public abstract interface class space/kscience/dataforge/meta/Meta : space/kscie
public static final field TYPE Ljava/lang/String;
public static final field VALUE_KEY Ljava/lang/String;
public abstract fun equals (Ljava/lang/Object;)Z
public abstract fun getItem (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public fun getItem (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public abstract fun getItems ()Ljava/util/Map;
public abstract fun hashCode ()I
public abstract fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
public fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
public abstract fun toString ()Ljava/lang/String;
}
@ -186,17 +187,10 @@ public final class space/kscience/dataforge/meta/Meta$Companion {
public final fun getEMPTY ()Lspace/kscience/dataforge/meta/Meta;
}
public final class space/kscience/dataforge/meta/Meta$DefaultImpls {
public static fun getItem (Lspace/kscience/dataforge/meta/Meta;Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public static fun toMeta (Lspace/kscience/dataforge/meta/Meta;)Lspace/kscience/dataforge/meta/Meta;
}
public abstract class space/kscience/dataforge/meta/MetaBase : space/kscience/dataforge/meta/Meta {
public fun <init> ()V
public fun equals (Ljava/lang/Object;)Z
public fun getItem (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public fun hashCode ()I
public fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
public fun toString ()Ljava/lang/String;
}
@ -398,11 +392,6 @@ public abstract interface class space/kscience/dataforge/meta/MutableMeta : spac
public abstract fun getItems ()Ljava/util/Map;
}
public final class space/kscience/dataforge/meta/MutableMeta$DefaultImpls {
public static fun getItem (Lspace/kscience/dataforge/meta/MutableMeta;Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public static fun toMeta (Lspace/kscience/dataforge/meta/MutableMeta;)Lspace/kscience/dataforge/meta/Meta;
}
public final class space/kscience/dataforge/meta/MutableMetaKt {
public static final fun append (Lspace/kscience/dataforge/meta/MutableItemProvider;Ljava/lang/String;Ljava/lang/Object;)V
public static final fun append (Lspace/kscience/dataforge/meta/MutableItemProvider;Lspace/kscience/dataforge/names/Name;Ljava/lang/Object;)V
@ -419,14 +408,10 @@ public final class space/kscience/dataforge/meta/ObservableItemProviderKt {
public abstract interface class space/kscience/dataforge/meta/ReadOnlySpecification {
public abstract fun empty ()Lspace/kscience/dataforge/meta/ItemProvider;
public abstract fun invoke (Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/ItemProvider;
public fun invoke (Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/ItemProvider;
public abstract fun read (Lspace/kscience/dataforge/meta/ItemProvider;)Lspace/kscience/dataforge/meta/ItemProvider;
}
public final class space/kscience/dataforge/meta/ReadOnlySpecification$DefaultImpls {
public static fun invoke (Lspace/kscience/dataforge/meta/ReadOnlySpecification;Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/ItemProvider;
}
public class space/kscience/dataforge/meta/Scheme : space/kscience/dataforge/meta/ItemPropertyProvider, space/kscience/dataforge/meta/MetaRepr, space/kscience/dataforge/meta/descriptors/Described {
public fun <init> ()V
public fun getDefaultLayer ()Lspace/kscience/dataforge/meta/Meta;
@ -475,10 +460,6 @@ public final class space/kscience/dataforge/meta/SealedMetaKt {
public abstract interface class space/kscience/dataforge/meta/Specification : space/kscience/dataforge/meta/ReadOnlySpecification {
public abstract fun write (Lspace/kscience/dataforge/meta/MutableItemProvider;Lspace/kscience/dataforge/meta/ItemProvider;)Lspace/kscience/dataforge/meta/MutableItemProvider;
}
public final class space/kscience/dataforge/meta/Specification$DefaultImpls {
public static fun invoke (Lspace/kscience/dataforge/meta/Specification;Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/MutableItemProvider;
public static synthetic fun write$default (Lspace/kscience/dataforge/meta/Specification;Lspace/kscience/dataforge/meta/MutableItemProvider;Lspace/kscience/dataforge/meta/ItemProvider;ILjava/lang/Object;)Lspace/kscience/dataforge/meta/MutableItemProvider;
}
@ -491,15 +472,10 @@ public final class space/kscience/dataforge/meta/SpecificationKt {
}
public abstract interface class space/kscience/dataforge/meta/TypedMeta : space/kscience/dataforge/meta/Meta {
public abstract fun getItem (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public fun getItem (Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public abstract fun getItems ()Ljava/util/Map;
}
public final class space/kscience/dataforge/meta/TypedMeta$DefaultImpls {
public static fun getItem (Lspace/kscience/dataforge/meta/TypedMeta;Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/TypedMetaItem;
public static fun toMeta (Lspace/kscience/dataforge/meta/TypedMeta;)Lspace/kscience/dataforge/meta/Meta;
}
public abstract class space/kscience/dataforge/meta/TypedMetaItem {
public static final field Companion Lspace/kscience/dataforge/meta/TypedMetaItem$Companion;
public abstract fun equals (Ljava/lang/Object;)Z
@ -530,78 +506,117 @@ public final class space/kscience/dataforge/meta/descriptors/DescriptorMetaKt {
public static final fun defaultMeta (Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;)Lspace/kscience/dataforge/meta/Laminate;
}
public abstract class space/kscience/dataforge/meta/descriptors/ItemDescriptor : space/kscience/dataforge/meta/Configurable {
public abstract interface class space/kscience/dataforge/meta/descriptors/ItemDescriptor : space/kscience/dataforge/meta/MetaRepr {
public static final field Companion Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor$Companion;
public static final field DEFAULT_INDEX_KEY Ljava/lang/String;
public synthetic fun <init> (Lspace/kscience/dataforge/meta/Config;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public abstract fun copy ()Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public final fun getAttributes ()Lspace/kscience/dataforge/meta/Config;
public final fun getConfig ()Lspace/kscience/dataforge/meta/Config;
public final fun getIndexKey ()Ljava/lang/String;
public final fun getInfo ()Ljava/lang/String;
public final fun getMultiple ()Z
public abstract fun getAttributes ()Lspace/kscience/dataforge/meta/Meta;
public abstract fun getIndexKey ()Ljava/lang/String;
public abstract fun getInfo ()Ljava/lang/String;
public abstract fun getMultiple ()Z
public abstract fun getRequired ()Z
public final fun setAttributes (Lspace/kscience/dataforge/meta/Config;)V
public final fun setIndexKey (Ljava/lang/String;)V
public final fun setInfo (Ljava/lang/String;)V
public final fun setMultiple (Z)V
public abstract fun setRequired (Z)V
}
public final class space/kscience/dataforge/meta/descriptors/ItemDescriptor$Companion {
public static final field DEFAULT_INDEX_KEY Ljava/lang/String;
}
public abstract class space/kscience/dataforge/meta/descriptors/ItemDescriptorBuilder : space/kscience/dataforge/meta/Configurable, space/kscience/dataforge/meta/descriptors/ItemDescriptor {
public static final field Companion Lspace/kscience/dataforge/meta/descriptors/ItemDescriptorBuilder$Companion;
public static final field DEFAULT_INDEX_KEY Ljava/lang/String;
public synthetic fun <init> (Lspace/kscience/dataforge/meta/Config;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public abstract fun build ()Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public fun getAttributes ()Lspace/kscience/dataforge/meta/Config;
public synthetic fun getAttributes ()Lspace/kscience/dataforge/meta/Meta;
public final fun getConfig ()Lspace/kscience/dataforge/meta/Config;
public fun getIndexKey ()Ljava/lang/String;
public fun getInfo ()Ljava/lang/String;
public fun getMultiple ()Z
public abstract fun getRequired ()Z
public fun setAttributes (Lspace/kscience/dataforge/meta/Config;)V
public fun setIndexKey (Ljava/lang/String;)V
public fun setInfo (Ljava/lang/String;)V
public fun setMultiple (Z)V
public abstract fun setRequired (Z)V
public fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
}
public final class space/kscience/dataforge/meta/descriptors/ItemDescriptorBuilder$Companion {
}
public final class space/kscience/dataforge/meta/descriptors/ItemDescriptorKt {
public static final fun NodeDescriptor (Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;
public static final fun attributes (Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;Lkotlin/jvm/functions/Function1;)V
public static final fun attributes (Lspace/kscience/dataforge/meta/descriptors/ItemDescriptorBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun get (Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;Ljava/lang/String;)Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public static final fun get (Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;Lspace/kscience/dataforge/names/Name;)Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public static final fun plus (Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;)Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;
public static final fun validateItem (Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;Lspace/kscience/dataforge/meta/TypedMetaItem;)Z
}
public final class space/kscience/dataforge/meta/descriptors/NodeDescriptor : space/kscience/dataforge/meta/descriptors/ItemDescriptor {
public abstract interface class space/kscience/dataforge/meta/descriptors/NodeDescriptor : space/kscience/dataforge/meta/descriptors/ItemDescriptor {
public static final field Companion Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor$Companion;
public fun <init> ()V
public fun <init> (Lspace/kscience/dataforge/meta/Config;)V
public synthetic fun <init> (Lspace/kscience/dataforge/meta/Config;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun copy ()Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public fun copy ()Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;
public final fun getDefault ()Lspace/kscience/dataforge/meta/Config;
public final fun getItems ()Ljava/util/Map;
public final fun getNodes ()Ljava/util/Map;
public fun getRequired ()Z
public final fun getValues ()Ljava/util/Map;
public final fun item (Ljava/lang/String;Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;)V
public final fun item (Lspace/kscience/dataforge/names/Name;Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;)V
public final fun node (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public final fun node (Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function1;)V
public final fun setDefault (Lspace/kscience/dataforge/meta/Config;)V
public fun setRequired (Z)V
public final fun value (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public final fun value (Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function1;)V
public abstract fun getDefault ()Lspace/kscience/dataforge/meta/Config;
public abstract fun getItems ()Ljava/util/Map;
public abstract fun getNodes ()Ljava/util/Map;
public abstract fun getRequired ()Z
public abstract fun getValues ()Ljava/util/Map;
}
public final class space/kscience/dataforge/meta/descriptors/NodeDescriptor$Companion {
}
public final class space/kscience/dataforge/meta/descriptors/ValueDescriptor : space/kscience/dataforge/meta/descriptors/ItemDescriptor {
public final class space/kscience/dataforge/meta/descriptors/NodeDescriptorBuilder : space/kscience/dataforge/meta/descriptors/ItemDescriptorBuilder, space/kscience/dataforge/meta/descriptors/NodeDescriptor {
public static final field Companion Lspace/kscience/dataforge/meta/descriptors/NodeDescriptorBuilder$Companion;
public fun <init> ()V
public fun <init> (Lspace/kscience/dataforge/meta/Config;)V
public synthetic fun <init> (Lspace/kscience/dataforge/meta/Config;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun build ()Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public fun build ()Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;
public fun getDefault ()Lspace/kscience/dataforge/meta/Config;
public fun getItems ()Ljava/util/Map;
public fun getNodes ()Ljava/util/Map;
public fun getRequired ()Z
public fun getValues ()Ljava/util/Map;
public final fun item (Ljava/lang/String;Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;)V
public final fun item (Lspace/kscience/dataforge/names/Name;Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;)V
public final fun node (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public final fun node (Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function1;)V
public fun setDefault (Lspace/kscience/dataforge/meta/Config;)V
public fun setRequired (Z)V
public final fun value (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public final fun value (Lspace/kscience/dataforge/names/Name;Lkotlin/jvm/functions/Function1;)V
}
public final class space/kscience/dataforge/meta/descriptors/NodeDescriptorBuilder$Companion {
}
public final class space/kscience/dataforge/meta/descriptors/NodeDescriptorKt {
public static final fun NodeDescriptor (Lkotlin/jvm/functions/Function1;)Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;
public static final fun plus (Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;)Lspace/kscience/dataforge/meta/descriptors/NodeDescriptor;
}
public abstract interface class space/kscience/dataforge/meta/descriptors/ValueDescriptor : space/kscience/dataforge/meta/descriptors/ItemDescriptor {
public abstract fun getAllowedValues ()Ljava/util/List;
public abstract fun getDefault ()Lspace/kscience/dataforge/values/Value;
public abstract fun getRequired ()Z
public abstract fun getType ()Ljava/util/List;
public fun isAllowedValue (Lspace/kscience/dataforge/values/Value;)Z
}
public final class space/kscience/dataforge/meta/descriptors/ValueDescriptorBuilder : space/kscience/dataforge/meta/descriptors/ItemDescriptorBuilder, space/kscience/dataforge/meta/descriptors/ValueDescriptor {
public fun <init> ()V
public fun <init> (Lspace/kscience/dataforge/meta/Config;)V
public synthetic fun <init> (Lspace/kscience/dataforge/meta/Config;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun allow ([Ljava/lang/Object;)V
public synthetic fun copy ()Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public fun copy ()Lspace/kscience/dataforge/meta/descriptors/ValueDescriptor;
public synthetic fun build ()Lspace/kscience/dataforge/meta/descriptors/ItemDescriptor;
public fun build ()Lspace/kscience/dataforge/meta/descriptors/ValueDescriptor;
public final fun default (Ljava/lang/Object;)V
public final fun getAllowedValues ()Ljava/util/List;
public final fun getDefault ()Lspace/kscience/dataforge/values/Value;
public fun getAllowedValues ()Ljava/util/List;
public fun getDefault ()Lspace/kscience/dataforge/values/Value;
public fun getRequired ()Z
public final fun getType ()Ljava/util/List;
public final fun isAllowedValue (Lspace/kscience/dataforge/values/Value;)Z
public final fun setAllowedValues (Ljava/util/List;)V
public final fun setDefault (Lspace/kscience/dataforge/values/Value;)V
public fun getType ()Ljava/util/List;
public fun isAllowedValue (Lspace/kscience/dataforge/values/Value;)Z
public fun setAllowedValues (Ljava/util/List;)V
public fun setDefault (Lspace/kscience/dataforge/values/Value;)V
public fun setRequired (Z)V
public final fun setType (Ljava/util/List;)V
public fun setType (Ljava/util/List;)V
public final fun type ([Lspace/kscience/dataforge/values/ValueType;)V
}
@ -689,7 +704,6 @@ public final class space/kscience/dataforge/meta/transformations/RegexItemTransf
public final fun getTransform ()Lkotlin/jvm/functions/Function4;
public fun hashCode ()I
public fun matches (Lspace/kscience/dataforge/names/Name;Lspace/kscience/dataforge/meta/TypedMetaItem;)Z
public fun selectItems (Lspace/kscience/dataforge/meta/Meta;)Lkotlin/sequences/Sequence;
public fun toString ()Ljava/lang/String;
public fun transformItem (Lspace/kscience/dataforge/names/Name;Lspace/kscience/dataforge/meta/TypedMetaItem;Lspace/kscience/dataforge/meta/MutableMeta;)V
}
@ -712,14 +726,10 @@ public final class space/kscience/dataforge/meta/transformations/SingleItemTrans
public abstract interface class space/kscience/dataforge/meta/transformations/TransformationRule {
public abstract fun matches (Lspace/kscience/dataforge/names/Name;Lspace/kscience/dataforge/meta/TypedMetaItem;)Z
public abstract fun selectItems (Lspace/kscience/dataforge/meta/Meta;)Lkotlin/sequences/Sequence;
public fun selectItems (Lspace/kscience/dataforge/meta/Meta;)Lkotlin/sequences/Sequence;
public abstract fun transformItem (Lspace/kscience/dataforge/names/Name;Lspace/kscience/dataforge/meta/TypedMetaItem;Lspace/kscience/dataforge/meta/MutableMeta;)V
}
public final class space/kscience/dataforge/meta/transformations/TransformationRule$DefaultImpls {
public static fun selectItems (Lspace/kscience/dataforge/meta/transformations/TransformationRule;Lspace/kscience/dataforge/meta/Meta;)Lkotlin/sequences/Sequence;
}
public abstract interface annotation class space/kscience/dataforge/misc/DFBuilder : java/lang/annotation/Annotation {
}
@ -852,7 +862,6 @@ public final class space/kscience/dataforge/values/DoubleArrayValue : java/lang/
public final class space/kscience/dataforge/values/EnumValue : space/kscience/dataforge/values/Value {
public fun <init> (Ljava/lang/Enum;)V
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Enum;
public synthetic fun getValue ()Ljava/lang/Object;
@ -868,7 +877,6 @@ public final class space/kscience/dataforge/values/ExoticValuesKt {
public final class space/kscience/dataforge/values/False : space/kscience/dataforge/values/Value {
public static final field INSTANCE Lspace/kscience/dataforge/values/False;
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Object;
public fun hashCode ()I
@ -878,7 +886,6 @@ public final class space/kscience/dataforge/values/False : space/kscience/datafo
public final class space/kscience/dataforge/values/LazyParsedValue : space/kscience/dataforge/values/Value {
public fun <init> (Ljava/lang/String;)V
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public final fun getString ()Ljava/lang/String;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Object;
@ -906,7 +913,6 @@ public final class space/kscience/dataforge/values/ListValue$Companion {
public final class space/kscience/dataforge/values/Null : space/kscience/dataforge/values/Value {
public static final field INSTANCE Lspace/kscience/dataforge/values/Null;
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Object;
public fun hashCode ()I
@ -916,7 +922,6 @@ public final class space/kscience/dataforge/values/Null : space/kscience/datafor
public final class space/kscience/dataforge/values/NumberValue : space/kscience/dataforge/values/Value {
public fun <init> (Ljava/lang/Number;)V
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public final fun getNumber ()Ljava/lang/Number;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Object;
@ -927,7 +932,6 @@ public final class space/kscience/dataforge/values/NumberValue : space/kscience/
public final class space/kscience/dataforge/values/StringValue : space/kscience/dataforge/values/Value {
public fun <init> (Ljava/lang/String;)V
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public final fun getString ()Ljava/lang/String;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Object;
@ -938,7 +942,6 @@ public final class space/kscience/dataforge/values/StringValue : space/kscience/
public final class space/kscience/dataforge/values/True : space/kscience/dataforge/values/Value {
public static final field INSTANCE Lspace/kscience/dataforge/values/True;
public fun equals (Ljava/lang/Object;)Z
public fun getList ()Ljava/util/List;
public fun getType ()Lspace/kscience/dataforge/values/ValueType;
public fun getValue ()Ljava/lang/Object;
public fun hashCode ()I
@ -949,7 +952,7 @@ public abstract interface class space/kscience/dataforge/values/Value {
public static final field Companion Lspace/kscience/dataforge/values/Value$Companion;
public static final field TYPE Ljava/lang/String;
public abstract fun equals (Ljava/lang/Object;)Z
public abstract fun getList ()Ljava/util/List;
public fun getList ()Ljava/util/List;
public abstract fun getType ()Lspace/kscience/dataforge/values/ValueType;
public abstract fun getValue ()Ljava/lang/Object;
public abstract fun hashCode ()I
@ -961,10 +964,6 @@ public final class space/kscience/dataforge/values/Value$Companion {
public final fun of (Ljava/lang/Object;)Lspace/kscience/dataforge/values/Value;
}
public final class space/kscience/dataforge/values/Value$DefaultImpls {
public static fun getList (Lspace/kscience/dataforge/values/Value;)Ljava/util/List;
}
public final class space/kscience/dataforge/values/ValueExtensionsKt {
public static final fun getBoolean (Lspace/kscience/dataforge/values/Value;)Z
public static final fun getDouble (Lspace/kscience/dataforge/values/Value;)D

View File

@ -2,13 +2,11 @@ pluginManagement {
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
jcenter()
gradlePluginPortal()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
val toolsVersion = "0.9.5-dev"
val kotlinVersion = "1.5.0-M2"
val toolsVersion = "0.9.5"
val kotlinVersion = "1.5.0"
plugins {
id("ru.mipt.npm.gradle.project") version toolsVersion