Package net.sourceforge.pmd.lang.xml.ast
Class XmlNodeWrapper
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.AbstractNode
-
- net.sourceforge.pmd.lang.xml.ast.AbstractDomNodeProxy
-
- net.sourceforge.pmd.lang.xml.ast.XmlNodeWrapper
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.Node,net.sourceforge.pmd.lang.ast.xpath.AttributeNode,XmlNode,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
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.lang.xml.ast.AbstractDomNodeProxy
node
-
Fields inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
beginColumn, beginLine, childIndex, children, endColumn, endLine, firstToken, id, lastToken, parent
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Fields inherited from interface net.sourceforge.pmd.lang.xml.ast.XmlNode
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE
-
-
Constructor Summary
Constructors Constructor Description XmlNodeWrapper(XmlParser parser, Node domNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DocumentgetAsDocument()Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute>getAttributeIterator()Deprecated.intgetBeginColumn()intgetBeginLine()net.sourceforge.pmd.lang.ast.NodegetChild(int index)net.sourceforge.pmd.lang.dfa.DataFlowNodegetDataFlowNode()intgetEndColumn()intgetEndLine()StringgetImage()NodegetNode()Provide access to the underlying DOM node.intgetNumChildren()ObjectgetUserData()Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute>getXPathAttributesIterator()StringgetXPathNodeName()booleanhasImageEqualTo(String image)booleanisFindBoundary()voidjjtAddChild(net.sourceforge.pmd.lang.ast.Node child, int index)voidjjtClose()XmlNodejjtGetChild(int index)intjjtGetChildIndex()intjjtGetId()intjjtGetNumChildren()XmlNodejjtGetParent()voidjjtSetChildIndex(int index)voidjjtSetParent(net.sourceforge.pmd.lang.ast.Node parent)voidremove()voidremoveChildAtIndex(int childIndex)voidsetDataFlowNode(net.sourceforge.pmd.lang.dfa.DataFlowNode dataFlowNode)voidsetImage(String image)voidsetUserData(Object userData)StringtoString()-
Methods inherited from class net.sourceforge.pmd.lang.xml.ast.AbstractDomNodeProxy
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, children, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getIndexInParent, getNthParent, getParent, getParentsOfType, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, isSingleLine, jjtGetFirstToken, jjtGetLastToken, jjtOpen, jjtSetFirstToken, jjtSetLastToken, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine
-
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.Node
children, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getIndexInParent, getNthParent, getParent, getParentsOfType, hasDescendantMatchingXPath, hasDescendantOfType, jjtOpen
-
-
-
-
Method Detail
-
jjtClose
public void jjtClose()
- Specified by:
jjtClosein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtClosein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtSetParent
public void jjtSetParent(net.sourceforge.pmd.lang.ast.Node parent)
- Specified by:
jjtSetParentin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtSetParentin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetParent
public XmlNode jjtGetParent()
- Specified by:
jjtGetParentin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtGetParentin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtAddChild
public void jjtAddChild(net.sourceforge.pmd.lang.ast.Node child, int index)- Specified by:
jjtAddChildin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtAddChildin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtSetChildIndex
public void jjtSetChildIndex(int index)
- Specified by:
jjtSetChildIndexin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtSetChildIndexin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetChildIndex
public int jjtGetChildIndex()
- Specified by:
jjtGetChildIndexin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtGetChildIndexin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetChild
public XmlNode jjtGetChild(int index)
- Specified by:
jjtGetChildin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtGetChildin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getChild
public net.sourceforge.pmd.lang.ast.Node getChild(int index)
- Specified by:
getChildin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getChildin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetNumChildren
public int jjtGetNumChildren()
- Specified by:
jjtGetNumChildrenin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtGetNumChildrenin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getNumChildren
public int getNumChildren()
- Specified by:
getNumChildrenin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getNumChildrenin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetId
public int jjtGetId()
- Specified by:
jjtGetIdin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
jjtGetIdin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getImage
public String getImage()
- Specified by:
getImagein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getImagein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
setImage
public void setImage(String image)
- Specified by:
setImagein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
setImagein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
hasImageEqualTo
public boolean hasImageEqualTo(String image)
- Specified by:
hasImageEqualToin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
hasImageEqualToin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getBeginLine
public int getBeginLine()
- Specified by:
getBeginLinein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getBeginLinein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getBeginColumn
public int getBeginColumn()
- Specified by:
getBeginColumnin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getBeginColumnin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getEndLine
public int getEndLine()
- Specified by:
getEndLinein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getEndLinein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getEndColumn
public int getEndColumn()
- Specified by:
getEndColumnin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getEndColumnin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getDataFlowNode
public net.sourceforge.pmd.lang.dfa.DataFlowNode getDataFlowNode()
- Specified by:
getDataFlowNodein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getDataFlowNodein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
setDataFlowNode
public void setDataFlowNode(net.sourceforge.pmd.lang.dfa.DataFlowNode dataFlowNode)
- Specified by:
setDataFlowNodein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
setDataFlowNodein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
isFindBoundary
public boolean isFindBoundary()
- Specified by:
isFindBoundaryin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
isFindBoundaryin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getAsDocument
public Document getAsDocument()
- Specified by:
getAsDocumentin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getAsDocumentin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getUserData
public Object getUserData()
- Specified by:
getUserDatain interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getUserDatain classnet.sourceforge.pmd.lang.ast.AbstractNode
-
setUserData
public void setUserData(Object userData)
- Specified by:
setUserDatain interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
setUserDatain classnet.sourceforge.pmd.lang.ast.AbstractNode
-
remove
public void remove()
- Specified by:
removein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
removein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
removeChildAtIndex
public void removeChildAtIndex(int childIndex)
- Specified by:
removeChildAtIndexin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
removeChildAtIndexin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getXPathNodeName
public String getXPathNodeName()
- Specified by:
getXPathNodeNamein interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getXPathNodeNamein classnet.sourceforge.pmd.lang.ast.AbstractNode
-
toString
public String toString()
- Overrides:
toStringin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getXPathAttributesIterator
public Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute> getXPathAttributesIterator()
- Specified by:
getXPathAttributesIteratorin interfacenet.sourceforge.pmd.lang.ast.Node- Overrides:
getXPathAttributesIteratorin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getAttributeIterator
@Deprecated public Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute> getAttributeIterator()
Deprecated.- Specified by:
getAttributeIteratorin interfacenet.sourceforge.pmd.lang.ast.xpath.AttributeNode
-
-