Automatically generating annotations.xml


I’ve found recently that Kotlin supports external annotations to existing libraries (including JDK classes). In this blog post it was mentioned that some automated tool inferring annotations from bytecode is being worked on. Does this tool exist or it wasn’t completed?


The support for external annotations has been removed from Kotlin. The tool exists, but it’s not maintained and will not help you much anyway.


Last version of Idea have some quick actions, I can open JDK method, press Alt+Enter and choose “Annotate method as @NotNull” and it seems to work, annotations.xml created and updated properly. I thought it was for Kotlin, but I can see now, that Kotlin indeed ignores this file.