AnnotationVisitor with Class parameters
If I understand AnnotationVisitor correctly visit can only append certain kinds of parameter values - I was looking to dynamically build a com.fasterxml.jackson.annotation.JsonSubType.Type annotation which has a parameter that takes a Class value : public Class<?> value()
When I supply a Class object to av.visit("value", someClass) the annotation is not populated; if instead do av.visit("value", "org.something.SomeClass") the annotation is inserted though with the /* Warning type mismatch ... pieces wrapping it, because, well, that's wrong - but it is proving to me that I'm invoking the visitors in the proper way.
Is there some other workaround or approach to write a Class parameter? Or can support for Class parameters be added?