I am writing a code generator using JavaPoet and I need to put the annotation in a class
For instance:
@RequestMapping("/api") public class SomeResource {
I can go this far:
TypeSpec spec = TypeSpec .classBuilder("SomeResource") .addAnnotation(AnnotationSpec.builder(RequestMapping.class)
An addMember method exists in AnnotationSpec.Builder, but it doesn't seem to do what I want.
source share