Search in sources :

Example 1 with PLSQLParserVisitorAdapter

use of net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter in project pmd by pmd.

the class PLSQLRuleChainVisitor method indexNodes.

@Override
protected void indexNodes(List<Node> nodes, RuleContext ctx) {
    LOGGER.entering(CLASS_NAME, "indexNodes");
    PLSQLParserVisitor plsqlParserVistor = new PLSQLParserVisitorAdapter() {

        // Perform a visitation of the AST to index nodes which need
        // visiting by type
        @Override
        public Object visit(PLSQLNode node, Object data) {
            indexNode(node);
            return super.visit(node, data);
        }
    };
    for (int i = 0; i < nodes.size(); i++) {
        plsqlParserVistor.visit((ASTInput) nodes.get(i), ctx);
    }
    LOGGER.exiting(CLASS_NAME, "indexNodes");
}
Also used : PLSQLParserVisitor(net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitor) PLSQLNode(net.sourceforge.pmd.lang.plsql.ast.PLSQLNode) PLSQLParserVisitorAdapter(net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter)

Aggregations

PLSQLNode (net.sourceforge.pmd.lang.plsql.ast.PLSQLNode)1 PLSQLParserVisitor (net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitor)1 PLSQLParserVisitorAdapter (net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter)1