KeepTransformationRule

data class KeepTransformationRule(selector: (Name) -> Boolean) : TransformationRule

A transformation which keeps all elements, matching selector unchanged.

Constructors

KeepTransformationRule
Link copied to clipboard
common
fun KeepTransformationRule(selector: (Name) -> Boolean)

Functions

matches
Link copied to clipboard
common
open override fun matches(name: Name, item: Meta?): Boolean

Check if this transformation should be applied to a node with given name and value

selectItems
Link copied to clipboard
common
open override fun selectItems(meta: Meta): Sequence<Name>

Select all items to be transformed. Item could be a value as well as node

transformItem
Link copied to clipboard
common
open override fun transformItem(name: Name, item: Meta?, target: MutableMeta)

Apply transformation for a single item (Node or Value) to the target

Properties

selector
Link copied to clipboard
common
val selector: (Name) -> Boolean