Discover the class of a methodinvocation in the Annotation Processor for java
I am writing some tools for our build system to enforce some strict calling conventions on methods belonging to classes containing certain annotations. I'm using the Compiler Tree API... What i'm wondering is when traversing the 'tree', how can you tell the type of class/interface for a MethodInvocation. I'm subclassing TreePathScanner with : @Override public Object visitMethodInvocation(MethodInvocationTree node, Trees trees) { } I'm hoping theres a way to tell the type of the class(or interface) that you're trying to invoke the method on. Am I going about this the wrong way? Thanks for any