
name.remal.org.objectweb.asm.tree.InsnList.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common Show documentation
Show all versions of common Show documentation
Java & Kotlin tools: common
The newest version!
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