pmd-lang-test / net.sourceforge.pmd.lang.ast.test / net.sourceforge.pmd.lang.ast.Node

Extensions for net.sourceforge.pmd.lang.ast.Node

childIndex

val Node.childIndex: Int

getChild

fun Node.getChild(i: Int): Node!

numChildren

val Node.numChildren: Int

Extension methods to make the Node API more Kotlin-like

parent

val Node.parent: Node?

safeGetChild

fun Node.safeGetChild(i: Int): Node?

shouldMatchNode

fun <N : Node> Node?.shouldMatchNode(ignoreChildren: Boolean = false, nodeSpec: NodeSpec<N>): Unit

A shorthand for baseShouldMatchSubtree providing the NodeTreeLikeAdapter.