Java: Add support for Annotation types stub generation
Adds support for Annotation types in our Java stub generator.
Due to default values for Annotation methods not being currently supported, the stubs generated may need manual correction if the original types have default values, e.g. https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java#L85.
Should there be a test for this?
Good point @tamasvajk, thanks! I had to create a .jar file to test the stub generation, since our usual stubs are source files, which are ignored by the stub generator.
See 7687c8c for details, let me know if something doesn't add up.
Thanks for the review @tamasvajk @smowton and sorry for the delay. Comments addressed in f860ae8.