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

net.sourceforge.pmd.lang.velocity.ast.ASTBlock Maven / Gradle / Ivy

There is a newer version: 7.6.0
Show newest version
/*
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

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

import org.apache.commons.lang3.StringUtils;

public final class ASTBlock extends AbstractVtlNode {

    ASTBlock(int id) {
        super(id);
    }


    @Override
    protected  R acceptVtlVisitor(VtlVisitor visitor, P data) {
        return visitor.visit(this, data);
    }

    public boolean isEmpty() {
        return getNumChildren() == 0
            || getNumChildren() == 1
            && getChild(0) instanceof ASTText
            && StringUtils.isBlank(getChild(0).getText());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy