Refactor script infrastructure for easier usage and testability:
- add script annotation for specifying default configuration for a script - add support for this annotation in the default configurator - rename configurator accordingly - add default implementation of the refineConfiguration method - make property bag class open
This commit is contained in:
@@ -17,7 +17,7 @@ class TypedKeyDelegate<T> {
|
||||
|
||||
fun <T> typedKey() = TypedKeyDelegate<T>()
|
||||
|
||||
class ChainedPropertyBag private constructor(private val parent: ChainedPropertyBag?, private val data: Map<TypedKey<*>, Any?>) {
|
||||
open class ChainedPropertyBag private constructor(private val parent: ChainedPropertyBag?, private val data: Map<TypedKey<*>, Any?>) {
|
||||
constructor(parent: ChainedPropertyBag? = null, pairs: Iterable<Pair<TypedKey<*>, Any?>>) :
|
||||
this(parent, HashMap<TypedKey<*>, Any?>().also { it.putAll(pairs) })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user