/** * Recursively extract a FullIdent. * * @param full the FullIdent to add to * @param ast the node to recurse from */ private static void extractFullIdent(FullIdent full, DetailAST ast) { if (ast != null) { if (ast.getType() == TokenTypes.DOT) { extractFullIdent(full, ast.getFirstChild()); full.append("."); extractFullIdent( full, ast.getFirstChild().getNextSibling()); } else if (ast.getType() == TokenTypes.ARRAY_DECLARATOR) { extractFullIdent(full, ast.getFirstChild()); full.append("[]"); } else { full.append(ast); } } }
/** * Recursively extract a FullIdent. * * @param full the FullIdent to add to * @param ast the node to recurse from */ private static void extractFullIdent(FullIdent full, DetailAST ast) { if (ast != null) { if (ast.getType() == TokenTypes.DOT) { extractFullIdent(full, ast.getFirstChild()); full.append("."); extractFullIdent( full, ast.getFirstChild().getNextSibling()); } else if (ast.getType() == TokenTypes.ARRAY_DECLARATOR) { extractFullIdent(full, ast.getFirstChild()); full.append("[]"); } else { full.append(ast); } } }