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 Document
getAsDocument()
Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute>
getAttributeIterator()
Deprecated.int
getBeginColumn()
int
getBeginLine()
net.sourceforge.pmd.lang.dfa.DataFlowNode
getDataFlowNode()
int
getEndColumn()
int
getEndLine()
String
getImage()
Node
getNode()
Provide access to the underlying DOM node.Object
getUserData()
Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute>
getXPathAttributesIterator()
String
getXPathNodeName()
boolean
hasImageEqualTo(String image)
boolean
isFindBoundary()
void
jjtAddChild(net.sourceforge.pmd.lang.ast.Node child, int index)
void
jjtClose()
XmlNode
jjtGetChild(int index)
int
jjtGetChildIndex()
int
jjtGetId()
int
jjtGetNumChildren()
XmlNode
jjtGetParent()
void
jjtSetChildIndex(int index)
void
jjtSetParent(net.sourceforge.pmd.lang.ast.Node parent)
void
remove()
void
removeChildAtIndex(int childIndex)
void
setDataFlowNode(net.sourceforge.pmd.lang.dfa.DataFlowNode dataFlowNode)
void
setImage(String image)
void
setUserData(Object userData)
String
toString()
-
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, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getNthParent, 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
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getNthParent, getParentsOfType, hasDescendantMatchingXPath, hasDescendantOfType, jjtOpen
-
-
-
-
Method Detail
-
jjtClose
public void jjtClose()
- Specified by:
jjtClose
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtClose
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtSetParent
public void jjtSetParent(net.sourceforge.pmd.lang.ast.Node parent)
- Specified by:
jjtSetParent
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtSetParent
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetParent
public XmlNode jjtGetParent()
- Specified by:
jjtGetParent
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtGetParent
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtAddChild
public void jjtAddChild(net.sourceforge.pmd.lang.ast.Node child, int index)
- Specified by:
jjtAddChild
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtAddChild
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtSetChildIndex
public void jjtSetChildIndex(int index)
- Specified by:
jjtSetChildIndex
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtSetChildIndex
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetChildIndex
public int jjtGetChildIndex()
- Specified by:
jjtGetChildIndex
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtGetChildIndex
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetChild
public XmlNode jjtGetChild(int index)
- Specified by:
jjtGetChild
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtGetChild
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetNumChildren
public int jjtGetNumChildren()
- Specified by:
jjtGetNumChildren
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtGetNumChildren
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
jjtGetId
public int jjtGetId()
- Specified by:
jjtGetId
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
jjtGetId
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getImage
public String getImage()
- Specified by:
getImage
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getImage
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
setImage
public void setImage(String image)
- Specified by:
setImage
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
setImage
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
hasImageEqualTo
public boolean hasImageEqualTo(String image)
- Specified by:
hasImageEqualTo
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
hasImageEqualTo
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getBeginLine
public int getBeginLine()
- Specified by:
getBeginLine
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getBeginLine
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getBeginColumn
public int getBeginColumn()
- Specified by:
getBeginColumn
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getBeginColumn
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getEndLine
public int getEndLine()
- Specified by:
getEndLine
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getEndLine
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getEndColumn
public int getEndColumn()
- Specified by:
getEndColumn
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getEndColumn
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getDataFlowNode
public net.sourceforge.pmd.lang.dfa.DataFlowNode getDataFlowNode()
- Specified by:
getDataFlowNode
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getDataFlowNode
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
setDataFlowNode
public void setDataFlowNode(net.sourceforge.pmd.lang.dfa.DataFlowNode dataFlowNode)
- Specified by:
setDataFlowNode
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
setDataFlowNode
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
isFindBoundary
public boolean isFindBoundary()
- Specified by:
isFindBoundary
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
isFindBoundary
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getAsDocument
public Document getAsDocument()
- Specified by:
getAsDocument
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getAsDocument
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getUserData
public Object getUserData()
- Specified by:
getUserData
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getUserData
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
setUserData
public void setUserData(Object userData)
- Specified by:
setUserData
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
setUserData
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
remove
public void remove()
- Specified by:
remove
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
remove
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
removeChildAtIndex
public void removeChildAtIndex(int childIndex)
- Specified by:
removeChildAtIndex
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
removeChildAtIndex
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getXPathNodeName
public String getXPathNodeName()
- Specified by:
getXPathNodeName
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getXPathNodeName
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
toString
public String toString()
- Overrides:
toString
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getXPathAttributesIterator
public Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute> getXPathAttributesIterator()
- Specified by:
getXPathAttributesIterator
in interfacenet.sourceforge.pmd.lang.ast.Node
- Overrides:
getXPathAttributesIterator
in classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getAttributeIterator
@Deprecated public Iterator<net.sourceforge.pmd.lang.ast.xpath.Attribute> getAttributeIterator()
Deprecated.- Specified by:
getAttributeIterator
in interfacenet.sourceforge.pmd.lang.ast.xpath.AttributeNode
-
-