All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.pmd.lang.velocity.rule.AbstractVtlRule Maven / Gradle / Ivy

The newest version!
/*
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.velocity.rule;

import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.rule.AbstractRule;
import net.sourceforge.pmd.lang.velocity.ast.VtlVisitor;
import net.sourceforge.pmd.reporting.RuleContext;

public abstract class AbstractVtlRule extends AbstractRule implements VtlVisitor {

    @Override
    public void apply(Node target, RuleContext ctx) {
        target.acceptVisitor(this, ctx);
    }

    @Override
    public Object visitNode(Node node, Object param) {
        node.children().forEach(it -> it.acceptVisitor(this, param));
        return param;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy