Source set: Common
public interface TraversableNode : DelegatableNode
Allows Modifier.Node classes to traverse up/down the Node tree for classes of the same type or for a particular key (traverseKey).
Note: The actual traversals are done in extension functions (see bottom of file).
Properties
traverseKey
Source set: Common
public val traverseKey: Any
Members
Companion
Source set: Common
public companion object
Members
TraverseDescendantsAction
Source set: Common
public enum class TraverseDescendantsAction {
ContinueTraversal,
SkipSubtreeAndContinueTraversal,
CancelTraversal,
}
Tree traversal actions for the traverseDescendantsIf related functions:
- Continue - continue the traversal
- SkipSubtreeAndContinue - continue the traversal BUT skip the matching node's subtree
- CancelTraversal - cancels the traversal (returns from function call)
(this is a rarer case)
To see examples of all the actions, see TraversableModifierNodeTest. For a return/cancel example specifically, see traverseSubtreeWithSameKeyIf_cancelTraversalOfDifferentClassSameKey().
Members
ContinueTraversal
Source set: Common
ContinueTraversal
SkipSubtreeAndContinueTraversal
Source set: Common
SkipSubtreeAndContinueTraversal
CancelTraversal
Source set: Common
CancelTraversal