ExpressionParser parser = new ExpressionParser(System.in); // can be only one ASTRoot root = parser.parse("call(@RequiresNew public * foo.Bar.*(String, ..) AND withincode(* foo.Baz.within(..)"); Expression expression = new Expression(root); ...