Class ASTDefnTrait

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.Node, ScalaNode<scala.meta.Defn.Trait>

    public class ASTDefnTrait
    extends net.sourceforge.pmd.lang.ast.AbstractNode
    The ASTDefnTrait node implementation.
    • Field Summary

      • Fields inherited from class net.sourceforge.pmd.lang.ast.AbstractNode

        beginColumn, beginLine, childIndex, children, endColumn, endLine, firstToken, id, lastToken, parent
    • Constructor Summary

      Constructors 
      Constructor Description
      ASTDefnTrait​(scala.meta.Defn.Trait scalaNode)
      Create the AST node for this Scala node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <D,​R>
      R
      accept​(ScalaParserVisitor<D,​R> visitor, D data)
      Accept a visitor and traverse this node.
      int getBeginColumn()  
      int getBeginLine()  
      int getEndColumn()  
      int getEndLine()  
      T getNode()
      Get the underlying Scala Node.
      String getXPathNodeName()  
      boolean isImplicit()
      Returns true if the node is implicit.
      ScalaNode<?> jjtGetChild​(int index)  
      ScalaNode<?> jjtGetParent()  
      void testingOnlySetBeginColumn​(int i)  
      void testingOnlySetBeginLine​(int i)  
      void testingOnlySetEndColumn​(int i)  
      void testingOnlySetEndLine​(int i)  
      • Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode

        appendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getDataFlowNode, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathAttributesIterator, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtClose, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtOpen, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, toString
      • Methods inherited from interface net.sourceforge.pmd.lang.ast.Node

        findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getDataFlowNode, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathAttributesIterator, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
    • Constructor Detail

      • ASTDefnTrait

        public ASTDefnTrait​(scala.meta.Defn.Trait scalaNode)
        Create the AST node for this Scala node.
        Parameters:
        scalaNode - the underlying Scala node
    • Method Detail

      • accept

        public <D,​R> R accept​(ScalaParserVisitor<D,​R> visitor,
                                    D data)
        Description copied from interface: ScalaNode
        Accept a visitor and traverse this node.
        Specified by:
        accept in interface ScalaNode<scala.meta.Defn.Trait>
        Type Parameters:
        D - The type of the data input
        R - The type of the returned data
        Parameters:
        visitor - the visitor to visit this node with
        data - context-specific data to pass along
        Returns:
        context-specific data for this Visitor pattern
      • isImplicit

        public boolean isImplicit()
        Description copied from interface: ScalaNode
        Returns true if the node is implicit. If this node has no non-implicit descendant, then its text bounds identify an empty region of the source document. In that case, the end column is smaller than the begin column. That's because the end column index is inclusive.
        Specified by:
        isImplicit in interface ScalaNode<T extends scala.meta.Tree>
      • getBeginLine

        public int getBeginLine()
        Specified by:
        getBeginLine in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getBeginLine in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getBeginColumn

        public int getBeginColumn()
        Specified by:
        getBeginColumn in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getBeginColumn in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getEndLine

        public int getEndLine()
        Specified by:
        getEndLine in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getEndLine in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getEndColumn

        public int getEndColumn()
        Specified by:
        getEndColumn in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getEndColumn in class net.sourceforge.pmd.lang.ast.AbstractNode
      • testingOnlySetBeginColumn

        public void testingOnlySetBeginColumn​(int i)
        Overrides:
        testingOnlySetBeginColumn in class net.sourceforge.pmd.lang.ast.AbstractNode
      • testingOnlySetBeginLine

        public void testingOnlySetBeginLine​(int i)
        Overrides:
        testingOnlySetBeginLine in class net.sourceforge.pmd.lang.ast.AbstractNode
      • testingOnlySetEndColumn

        public void testingOnlySetEndColumn​(int i)
        Overrides:
        testingOnlySetEndColumn in class net.sourceforge.pmd.lang.ast.AbstractNode
      • testingOnlySetEndLine

        public void testingOnlySetEndLine​(int i)
        Overrides:
        testingOnlySetEndLine in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getNode

        public T getNode()
        Description copied from interface: ScalaNode
        Get the underlying Scala Node.
        Specified by:
        getNode in interface ScalaNode<T extends scala.meta.Tree>
        Returns:
        the Scala Node for this node
      • jjtGetChild

        public ScalaNode<?> jjtGetChild​(int index)
        Specified by:
        jjtGetChild in interface net.sourceforge.pmd.lang.ast.Node
        Specified by:
        jjtGetChild in interface ScalaNode<T extends scala.meta.Tree>
        Overrides:
        jjtGetChild in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtGetParent

        public ScalaNode<?> jjtGetParent()
        Specified by:
        jjtGetParent in interface net.sourceforge.pmd.lang.ast.Node
        Specified by:
        jjtGetParent in interface ScalaNode<T extends scala.meta.Tree>
        Overrides:
        jjtGetParent in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getXPathNodeName

        public String getXPathNodeName()
        Specified by:
        getXPathNodeName in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getXPathNodeName in class net.sourceforge.pmd.lang.ast.AbstractNode