Hi,
is there a way (and if so, how ?) to traverse a XPath query recursively ?
I have an AST in Java with the following scenario
@Relevant
public void foo() {
bar(true);
}
public void bar(boolean flag) {
assert flag;
}
I want to find the method which is annotated with '@Relevant' (thats easy) and check if the method which is called in foo (here bar) does have an assert Statement.
So a) how do I extract the methode name 'bar' and ask via XPath for the method called 'bar' ?
and what if 'bar' actually calls 'bla' in which the assert happens ?
hope this is understandable...
Thanks for any help