All Downloads are FREE. Search and download functionalities are using the official Maven repository.

name.remal.org.objectweb.asm.tree.ClassNode.kt Maven / Gradle / Ivy

package name.remal

import org.objectweb.asm.tree.AnnotationNode
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.TypeAnnotationNode

val ClassNode.isKotlinClass: Boolean
    get() = sequenceOf(visibleAnnotations, invisibleAnnotations)
        .filterNotNull()
        .flatten()
        .any { it.desc == "Lkotlin/Metadata;" }

val ClassNode.allAnnotations: List
    get() = sequenceOf(visibleAnnotations, invisibleAnnotations)
        .filterNotNull()
        .flatten()
        .toList()

val ClassNode.allTypeAnnotations: List
    get() = sequenceOf(visibleTypeAnnotations, invisibleTypeAnnotations)
        .filterNotNull()
        .flatten()
        .toList()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy