Skip to content

Instantly share code, notes, and snippets.

@pulse00
Created January 2, 2012 10:47
Show Gist options
  • Select an option

  • Save pulse00/1550258 to your computer and use it in GitHub Desktop.

Select an option

Save pulse00/1550258 to your computer and use it in GitHub Desktop.
/**
* statement to traverse:
* foo.bar(baz)
*/
module.traverse(new ASTVisitor()
{
@Override
public boolean endvisit(FieldAccess node) throws Exception
{
// dispatcher would be the IDENT 'foo'
Expression dispatcher = node.getDispatcher();
// field would be the call 'bar(baz)'
Expression field = node.getField();
return super.endvisit(node);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment