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:
Node,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<Attribute>getAttributeIterator()Deprecated.intgetBeginColumn()intgetBeginLine()NodegetChild(int index)DataFlowNodegetDataFlowNode()intgetEndColumn()intgetEndLine()StringgetImage()NodegetNode()Provide access to the underlying DOM node.intgetNumChildren()ObjectgetUserData()Iterator<Attribute>getXPathAttributesIterator()StringgetXPathNodeName()booleanhasImageEqualTo(String image)booleanisFindBoundary()voidjjtAddChild(Node child, int index)voidjjtClose()XmlNodejjtGetChild(int index)intjjtGetChildIndex()intjjtGetId()intjjtGetNumChildren()XmlNodejjtGetParent()voidjjtSetChildIndex(int index)voidjjtSetParent(Node parent)voidremove()voidremoveChildAtIndex(int childIndex)voidsetDataFlowNode(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, getUserMap, 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, getUserMap, hasDescendantMatchingXPath, hasDescendantOfType, jjtOpen
-
-
-
-
Method Detail
-
jjtClose
public void jjtClose()
- Specified by:
jjtClosein interfaceNode- Overrides:
jjtClosein classAbstractNode
-
jjtSetParent
public void jjtSetParent(Node parent)
- Specified by:
jjtSetParentin interfaceNode- Overrides:
jjtSetParentin classAbstractNode
-
jjtGetParent
public XmlNode jjtGetParent()
- Specified by:
jjtGetParentin interfaceNode- Overrides:
jjtGetParentin classAbstractNode
-
jjtAddChild
public void jjtAddChild(Node child, int index)
- Specified by:
jjtAddChildin interfaceNode- Overrides:
jjtAddChildin classAbstractNode
-
jjtSetChildIndex
public void jjtSetChildIndex(int index)
- Specified by:
jjtSetChildIndexin interfaceNode- Overrides:
jjtSetChildIndexin classAbstractNode
-
jjtGetChildIndex
public int jjtGetChildIndex()
- Specified by:
jjtGetChildIndexin interfaceNode- Overrides:
jjtGetChildIndexin classAbstractNode
-
jjtGetChild
public XmlNode jjtGetChild(int index)
- Specified by:
jjtGetChildin interfaceNode- Overrides:
jjtGetChildin classAbstractNode
-
getChild
public Node getChild(int index)
- Specified by:
getChildin interfaceNode- Overrides:
getChildin classAbstractNode
-
jjtGetNumChildren
public int jjtGetNumChildren()
- Specified by:
jjtGetNumChildrenin interfaceNode- Overrides:
jjtGetNumChildrenin classAbstractNode
-
getNumChildren
public int getNumChildren()
- Specified by:
getNumChildrenin interfaceNode- Overrides:
getNumChildrenin classAbstractNode
-
jjtGetId
public int jjtGetId()
- Specified by:
jjtGetIdin interfaceNode- Overrides:
jjtGetIdin classAbstractNode
-
getImage
public String getImage()
- Specified by:
getImagein interfaceNode- Overrides:
getImagein classAbstractNode
-
setImage
public void setImage(String image)
- Specified by:
setImagein interfaceNode- Overrides:
setImagein classAbstractNode
-
hasImageEqualTo
public boolean hasImageEqualTo(String image)
- Specified by:
hasImageEqualToin interfaceNode- Overrides:
hasImageEqualToin classAbstractNode
-
getBeginLine
public int getBeginLine()
- Specified by:
getBeginLinein interfaceNode- Overrides:
getBeginLinein classAbstractNode
-
getBeginColumn
public int getBeginColumn()
- Specified by:
getBeginColumnin interfaceNode- Overrides:
getBeginColumnin classAbstractNode
-
getEndLine
public int getEndLine()
- Specified by:
getEndLinein interfaceNode- Overrides:
getEndLinein classAbstractNode
-
getEndColumn
public int getEndColumn()
- Specified by:
getEndColumnin interfaceNode- Overrides:
getEndColumnin classAbstractNode
-
getDataFlowNode
public DataFlowNode getDataFlowNode()
- Specified by:
getDataFlowNodein interfaceNode- Overrides:
getDataFlowNodein classAbstractNode
-
setDataFlowNode
public void setDataFlowNode(DataFlowNode dataFlowNode)
- Specified by:
setDataFlowNodein interfaceNode- Overrides:
setDataFlowNodein classAbstractNode
-
isFindBoundary
public boolean isFindBoundary()
- Specified by:
isFindBoundaryin interfaceNode- Overrides:
isFindBoundaryin classAbstractNode
-
getAsDocument
public Document getAsDocument()
- Specified by:
getAsDocumentin interfaceNode- Overrides:
getAsDocumentin classAbstractNode
-
getUserData
public Object getUserData()
- Specified by:
getUserDatain interfaceNode- Overrides:
getUserDatain classAbstractNode
-
setUserData
public void setUserData(Object userData)
- Specified by:
setUserDatain interfaceNode- Overrides:
setUserDatain classAbstractNode
-
remove
public void remove()
- Specified by:
removein interfaceNode- Overrides:
removein classAbstractNode
-
removeChildAtIndex
public void removeChildAtIndex(int childIndex)
- Specified by:
removeChildAtIndexin interfaceNode- Overrides:
removeChildAtIndexin classAbstractNode
-
getXPathNodeName
public String getXPathNodeName()
- Specified by:
getXPathNodeNamein interfaceNode- Overrides:
getXPathNodeNamein classAbstractNode
-
toString
public String toString()
- Overrides:
toStringin classAbstractNode
-
getXPathAttributesIterator
public Iterator<Attribute> getXPathAttributesIterator()
- Specified by:
getXPathAttributesIteratorin interfaceNode- Overrides:
getXPathAttributesIteratorin classAbstractNode
-
getAttributeIterator
@Deprecated public Iterator<Attribute> getAttributeIterator()
Deprecated.- Specified by:
getAttributeIteratorin interfaceAttributeNode
-
-