Holder

This interface denotes that a Node "holds" a list of other nodes. See also ArgumentHolder and StatementHolder, in which Holder is used as a common interface.

A primary use-case for the usage of this interface is the Node Fluent DSL in order to create node objects which can either be used as a statement (e.g. in a Block) or as an argument (e.g. of a CallExpression).

Inheritors

Functions

Link copied to clipboard
abstract operator fun plusAssign(node: NodeTypeToHold)

Adds a Node to the list of "held" nodes.

Link copied to clipboard
abstract fun replace(old: NodeTypeToHold, new: NodeTypeToHold): Boolean

Replaces the existing node specified in old with the one in new. Implementation how to do that might be specific to the holder.