Help with compiler and AST needed [message #523418] |
Fri, 26 March 2010 07:50 |
Eclipse User |
|
|
|
Hello,
I am writing a plugin that hooks into the jdt compiler process. What I basically want to do is this:
I do have an annotation that marks a method with a certain type. Now I want to check each caller of this method, if he adheres to the convention defined by the annotation. Example
@ValidType(type=String.class)
void a(Object o) {}
void b() {
a("Hello"); // is correct
a(1); // is not correct
}
What I have accomplished so far, is that I am able to find all locations calling my marked method. I now want to analyze the contents of the method to be able to tell, if the caller of this method adheres to the calling convention defined by the annotation. Therefore I need to get the ASTNode for this method from the ResolvedSourceMethod element. And I don't know how to do this. If anyone could point me in the right direction would be great!
Greetings
|
|
|
Powered by
FUDForum. Page generated in 0.02623 seconds