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

net.sourceforge.pmd.lang.jsp.ast.AbstractJspNode Maven / Gradle / Ivy

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

package net.sourceforge.pmd.lang.jsp.ast;

import net.sourceforge.pmd.lang.ast.AstVisitor;
import net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode;

abstract class AbstractJspNode extends AbstractJjtreeNode implements JspNode {

    protected AbstractJspNode(int id) {
        super(id);
    }

    @Override
    @SuppressWarnings("unchecked")
    public final  R acceptVisitor(AstVisitor visitor, P data) {
        if (visitor instanceof JspVisitor) {
            return this.acceptVisitor((JspVisitor) visitor, data);
        }
        return visitor.cannotVisit(this, data);
    }

    protected abstract  R acceptVisitor(JspVisitor visitor, P data);

    @Override
    public String getXPathNodeName() {
        return JspParserImplTreeConstants.jjtNodeName[id];
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy