
name.remal.org.objectweb.asm.tree.InsnList.kt Maven / Gradle / Ivy
package name.remal
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.InsnList
fun InsnList.isEmpty() = 0 == size()
fun InsnList.isNotEmpty() = !isEmpty()
fun InsnList?.isNullOrEmpty() = null == this || isEmpty()
inline fun InsnList.forEach(action: (node: AbstractInsnNode) -> Unit) {
var node = first
while (null != node) {
action(node)
node = node.next
}
}
fun InsnList.toList() = buildList {
[email protected] { add(it) }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy