Method[] methods = _treeReturn.getDeclaredMethods();
for(Method method : methods) {
if ( method.getName().equals("getTree") ) {
Method treeReturnName = _treeReturn.getMethod("getTree");
CommonTree returnTree = (CommonTree) treeReturnName.invoke(treeRuleReturn);
astString = returnTree.toStringTree();
}
else if ( method.getName().equals("getTemplate") ) {
Method treeReturnName = _return.getMethod("getTemplate");
StringTemplate st = (StringTemplate) treeReturnName.invoke(treeRuleReturn);
stString = st.toString();