Class ASTName

    • Field Detail

      • node

        protected final T extends org.mozilla.javascript.ast.AstNode node
    • Method Detail

      • acceptJsVisitor

        protected <P,​R> R acceptJsVisitor​(EcmascriptVisitor<? super P,​? extends R> visitor,
                                                P data)
      • getIdentifier

        public String getIdentifier()
      • isLocalName

        public boolean isLocalName()
      • isGlobalName

        public boolean isGlobalName()
      • isFunctionNodeName

        public boolean isFunctionNodeName()
        Returns whether this name node is the name of a function declaration.
        Returns:
        true if name of a function declaration, false otherwise.
      • isFunctionNodeParameter

        public boolean isFunctionNodeParameter()
        Returns whether this name node is the name of a function declaration parameter.
        Returns:
        true if name of a function declaration parameter, false otherwise.
      • isFunctionCallName

        public boolean isFunctionCallName()
        Returns whether this name node is the name of a function call.
        Returns:
        true if name of a function call, false otherwise.
      • isVariableDeclaration

        public boolean isVariableDeclaration()
        Returns whether this name node is the name of a variable declaration.
        Returns:
        true if name of a variable declaration, false otherwise.
      • addChild

        protected void addChild​(net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?> child,
                                int index)
        Overrides:
        addChild in class AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,​EcmascriptNode<?>>
      • acceptVisitor

        public final <P,​R> R acceptVisitor​(AstVisitor<? super P,​? extends R> visitor,
                                                 P data)
        Specified by:
        acceptVisitor in interface Node
      • getJsDoc

        public String getJsDoc()
        Description copied from interface: EcmascriptNode
        Get the JsDoc associated with the given node. If there is no JsDoc on this node, it may be associated with a parent node, on more representative of the entire expression containing this node.
        Specified by:
        getJsDoc in interface EcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
        Returns:
        The JsDoc comment for the node, may be null.
      • hasSideEffects

        public boolean hasSideEffects()
        Specified by:
        hasSideEffects in interface EcmascriptNode<T extends org.mozilla.javascript.ast.AstNode>
      • setTrailingCommaExists

        protected void setTrailingCommaExists​(boolean b)