Class ASTHtmlElement

java.lang.Object
net.sourceforge.pmd.lang.ast.impl.AbstractNode<net.sourceforge.pmd.lang.html.ast.AbstractHtmlNode<?>,HtmlNode>
net.sourceforge.pmd.lang.html.ast.ASTHtmlElement
All Implemented Interfaces:
GenericNode<HtmlNode>, Node, HtmlNode, Reportable
Direct Known Subclasses:
ASTHtmlDocument

public class ASTHtmlElement extends AbstractNode<net.sourceforge.pmd.lang.html.ast.AbstractHtmlNode<?>,HtmlNode>
  • Field Details

    • node

      protected final org.jsoup.nodes.Element node
    • startOffset

      protected int startOffset
    • endOffset

      protected int endOffset
  • Method Details

    • acceptHtmlVisitor

      protected <P, R> R acceptHtmlVisitor(HtmlVisitor<? super P,? extends R> visitor, P data)
    • getAttributes

      public List<Attribute> getAttributes()
    • hasAttribute

      public boolean hasAttribute(String name)
    • getAttribute

      public String getAttribute(String rel)
    • getXPathAttributesIterator

      public Iterator<Attribute> getXPathAttributesIterator()
    • getNodeName

      public String getNodeName()
    • getXPathNodeName

      public String getXPathNodeName()
      Specified by:
      getXPathNodeName in interface Node
    • getTextRegion

      public TextRegion getTextRegion()
      Specified by:
      getTextRegion in interface Node
    • acceptVisitor

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

      protected void addChild(net.sourceforge.pmd.lang.html.ast.AbstractHtmlNode<?> child, int index)
      Overrides:
      addChild in class AbstractNode<net.sourceforge.pmd.lang.html.ast.AbstractHtmlNode<?>,HtmlNode>