Skip to content

Instantly share code, notes, and snippets.

@abreslav
Created November 16, 2015 08:02
Embed
What would you like to do?
annotation class A
fun main(args: Array<String>) {
val f = @A {}
f.javaClass.methods.filter { it.name == "invoke" && it.parameterTypes.isEmpty() }.forEach {
it.annotations.forEach(::println)
println(it)
println()
}
}
public java.lang.Object AnnKt$main$f$1.invoke()
@A()
public final void AnnKt$main$f$1.invoke()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment