jeudi 2 septembre 2021

Is there a way to add an annotation to a class at runtime with Kotlin?

Due to a third-party library requirement I have to do some finagling with annotations.

Using Kotlin, is there a way to dynamically add an annotation to class metadata at runtime like you can in Java?

e.g. something like:

clazz.annotations.set(idx, myAnnotation)




Aucun commentaire:

Enregistrer un commentaire