Class ASTAstRoot

java.lang.Object
net.sourceforge.pmd.lang.ast.impl.AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>>
net.sourceforge.pmd.lang.ecmascript.ast.ASTAstRoot
All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.impl.GenericNode<EcmascriptNode<?>>, net.sourceforge.pmd.lang.ast.Node, net.sourceforge.pmd.lang.ast.RootNode, EcmascriptNode<org.mozilla.javascript.ast.AstRoot>, net.sourceforge.pmd.reporting.Reportable

public final class ASTAstRoot extends net.sourceforge.pmd.lang.ast.impl.AbstractNode<net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?>,EcmascriptNode<?>> implements net.sourceforge.pmd.lang.ast.RootNode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.mozilla.javascript.ast.AstRoot
     

    Fields inherited from interface net.sourceforge.pmd.lang.ast.Node

    COORDS_COMPARATOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    ASTAstRoot(org.mozilla.javascript.ast.AstRoot astRoot)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <P, R> R
    acceptJsVisitor(EcmascriptVisitor<? super P,? extends R> visitor, P data)
     
    final <P, R> R
    acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor<? super P,? extends R> visitor, P data)
     
    protected void
    addChild(net.sourceforge.pmd.lang.ecmascript.ast.AbstractEcmascriptNode<?> child, int index)
     
    net.sourceforge.pmd.lang.ast.AstInfo<ASTAstRoot>
     
    getComment(int index)
     
    Get the JsDoc associated with the given node.
    int
     
    net.sourceforge.pmd.lang.document.TextRegion
     
     
    boolean
     
    protected void
     

    Methods inherited from class net.sourceforge.pmd.lang.ast.impl.AbstractNode

    children, firstChild, getChild, getIndexInParent, getNumChildren, getParent, getUserMap, insertChild, remove, removeChildAtIndex, setChild, setParent, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode

    ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSibling

    Methods inherited from interface net.sourceforge.pmd.lang.ast.Node

    acceptVisitor, ancestors, children, compareLocation, descendants, firstChild, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getRoot, getTextDocument, getTextRegion, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasImageEqualTo, isFindBoundary
  • Field Details

    • node

      protected final org.mozilla.javascript.ast.AstRoot node
  • Constructor Details

    • ASTAstRoot

      public ASTAstRoot(org.mozilla.javascript.ast.AstRoot astRoot)
  • Method Details

    • getAstInfo

      public net.sourceforge.pmd.lang.ast.AstInfo<ASTAstRoot> getAstInfo()
      Specified by:
      getAstInfo in interface net.sourceforge.pmd.lang.ast.Node
      Specified by:
      getAstInfo in interface net.sourceforge.pmd.lang.ast.RootNode
    • acceptJsVisitor

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

      public int getNumComments()
    • getComment

      public ASTComment getComment(int index)
    • addChild

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

      public net.sourceforge.pmd.lang.document.TextRegion getTextRegion()
      Specified by:
      getTextRegion in interface net.sourceforge.pmd.lang.ast.Node
    • acceptVisitor

      public final <P, R> R acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor<? super P,? extends R> visitor, P data)
      Specified by:
      acceptVisitor in interface net.sourceforge.pmd.lang.ast.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>
    • getXPathNodeName

      public String getXPathNodeName()
      Specified by:
      getXPathNodeName in interface net.sourceforge.pmd.lang.ast.Node
    • setTrailingCommaExists

      protected void setTrailingCommaExists(boolean b)