I have the following annotation:
@Target(ElementType.METHOD)
public @interface MyAnn {
}
and a method annotated with @MyAnn:
@MyAnn
Object myMehtod(Object x) {
...
}
Using a Java annotation processor I get the annotated element as:
Element annotatedElement // = myMehtod
- How do I get the return type of this method?
- How do I get the arguments of this method?
- How do I get the name of the arguments of this method?