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

net.sourceforge.pmd.lang.ecmascript.ast.AbstractFunctionCallNode Maven / Gradle / Ivy

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

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

import org.mozilla.javascript.ast.FunctionCall;

abstract class AbstractFunctionCallNode extends AbstractEcmascriptNode {

    AbstractFunctionCallNode(T node) {
        super(node);
    }

    public EcmascriptNode getTarget() {
        return (EcmascriptNode) getChild(0);
    }

    public int getNumArguments() {
        return node.getArguments().size();
    }

    public EcmascriptNode getArgument(int index) {
        return (EcmascriptNode) getChild(index + 1);
    }

    public boolean hasArguments() {
        return getNumArguments() != 0;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy