Specification

interface Specification<out T : Any> : ReadOnlySpecification<T>

Allows to apply custom configuration in a type safe way to simple untyped configuration. By convention Scheme companion should inherit this class

Functions

empty
Link copied to clipboard
common
abstract fun empty(): T

Generate an empty object

invoke
Link copied to clipboard
common
open operator fun invoke(action: T.() -> Unit): T

A convenience method to use specifications in builders

read
Link copied to clipboard
common
abstract fun read(source: Meta): T

Read generic read-only meta with this Specification producing instance of desired type. The source is not mutated even if it is in theory mutable

write
Link copied to clipboard
common
abstract fun write(target: MutableMeta): T

Wrap MutableMeta, using it as inner storage (changes to Specification are reflected on MutableMeta

Inheritors

SchemeSpec
Link copied to clipboard