Class XmlNodeWrapper

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.Node, net.sourceforge.pmd.lang.ast.xpath.AttributeNode, XmlNode, org.w3c.dom.Node
    Direct Known Subclasses:
    XmlParser.RootXmlNode

    public class XmlNodeWrapper
    extends AbstractDomNodeProxy
    implements XmlNode
    Proxy wrapping an XML DOM node (Node) to implement PMD interfaces.
    Since:
    6.1.0
    Author:
    Clément Fournier
    • Constructor Detail

      • XmlNodeWrapper

        public XmlNodeWrapper​(XmlParser parser,
                              org.w3c.dom.Node domNode)
    • Method Detail

      • jjtClose

        public void jjtClose()
        Specified by:
        jjtClose in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        jjtClose in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtSetParent

        public void jjtSetParent​(net.sourceforge.pmd.lang.ast.Node parent)
        Specified by:
        jjtSetParent in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        jjtSetParent in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtGetParent

        public XmlNode jjtGetParent()
        Specified by:
        jjtGetParent in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        jjtGetParent in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtAddChild

        public void jjtAddChild​(net.sourceforge.pmd.lang.ast.Node child,
                                int index)
        Specified by:
        jjtAddChild in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        jjtAddChild in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtSetChildIndex

        public void jjtSetChildIndex​(int index)
        Specified by:
        jjtSetChildIndex in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        jjtSetChildIndex in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtGetChildIndex

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

        public XmlNode jjtGetChild​(int index)
        Specified by:
        jjtGetChild in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        jjtGetChild in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtGetNumChildren

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

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

        public java.lang.String getImage()
        Specified by:
        getImage in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getImage in class net.sourceforge.pmd.lang.ast.AbstractNode
      • setImage

        public void setImage​(java.lang.String image)
        Specified by:
        setImage in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        setImage in class net.sourceforge.pmd.lang.ast.AbstractNode
      • hasImageEqualTo

        public boolean hasImageEqualTo​(java.lang.String image)
        Specified by:
        hasImageEqualTo in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        hasImageEqualTo in class net.sourceforge.pmd.lang.ast.AbstractNode
      • 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
      • getDataFlowNode

        public net.sourceforge.pmd.lang.dfa.DataFlowNode getDataFlowNode()
        Specified by:
        getDataFlowNode in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getDataFlowNode in class net.sourceforge.pmd.lang.ast.AbstractNode
      • setDataFlowNode

        public void setDataFlowNode​(net.sourceforge.pmd.lang.dfa.DataFlowNode dataFlowNode)
        Specified by:
        setDataFlowNode in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        setDataFlowNode in class net.sourceforge.pmd.lang.ast.AbstractNode
      • isFindBoundary

        public boolean isFindBoundary()
        Specified by:
        isFindBoundary in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        isFindBoundary in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getAsDocument

        public org.w3c.dom.Document getAsDocument()
        Specified by:
        getAsDocument in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getAsDocument in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getUserData

        public java.lang.Object getUserData()
        Specified by:
        getUserData in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getUserData in class net.sourceforge.pmd.lang.ast.AbstractNode
      • setUserData

        public void setUserData​(java.lang.Object userData)
        Specified by:
        setUserData in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        setUserData in class net.sourceforge.pmd.lang.ast.AbstractNode
      • remove

        public void remove()
        Specified by:
        remove in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        remove in class net.sourceforge.pmd.lang.ast.AbstractNode
      • removeChildAtIndex

        public void removeChildAtIndex​(int childIndex)
        Specified by:
        removeChildAtIndex in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        removeChildAtIndex in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getXPathNodeName

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

        public java.lang.String toString()
        Overrides:
        toString in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getXPathAttributesIterator

        public java.util.Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute> getXPathAttributesIterator()
        Specified by:
        getXPathAttributesIterator in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        getXPathAttributesIterator in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getAttributeIterator

        @Deprecated
        public java.util.Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute> getAttributeIterator()
        Specified by:
        getAttributeIterator in interface net.sourceforge.pmd.lang.ast.xpath.AttributeNode
      • getNode

        public org.w3c.dom.Node getNode()
        Description copied from interface: XmlNode
        Provide access to the underlying DOM node.
        Specified by:
        getNode in interface XmlNode
        Returns:
        The DOM node.