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 Document
getAsDocument()
Iterator<Attribute>
getAttributeIterator()
Deprecated.int
getBeginColumn()
int
getBeginLine()
Node
getChild(int index)
DataFlowNode
getDataFlowNode()
int
getEndColumn()
int
getEndLine()
String
getImage()
Node
getNode()
Provide access to the underlying DOM node.int
getNumChildren()
Object
getUserData()
Iterator<Attribute>
getXPathAttributesIterator()
String
getXPathNodeName()
boolean
hasImageEqualTo(String image)
boolean
isFindBoundary()
void
jjtAddChild(Node child, int index)
void
jjtClose()
XmlNode
jjtGetChild(int index)
int
jjtGetChildIndex()
int
jjtGetId()
int
jjtGetNumChildren()
XmlNode
jjtGetParent()
void
jjtSetChildIndex(int index)
void
jjtSetParent(Node parent)
void
remove()
void
removeChildAtIndex(int childIndex)
void
setDataFlowNode(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, 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:
jjtClose
in interfaceNode
- Overrides:
jjtClose
in classAbstractNode
-
jjtSetParent
public void jjtSetParent(Node parent)
- Specified by:
jjtSetParent
in interfaceNode
- Overrides:
jjtSetParent
in classAbstractNode
-
jjtGetParent
public XmlNode jjtGetParent()
- Specified by:
jjtGetParent
in interfaceNode
- Overrides:
jjtGetParent
in classAbstractNode
-
jjtAddChild
public void jjtAddChild(Node child, int index)
- Specified by:
jjtAddChild
in interfaceNode
- Overrides:
jjtAddChild
in classAbstractNode
-
jjtSetChildIndex
public void jjtSetChildIndex(int index)
- Specified by:
jjtSetChildIndex
in interfaceNode
- Overrides:
jjtSetChildIndex
in classAbstractNode
-
jjtGetChildIndex
public int jjtGetChildIndex()
- Specified by:
jjtGetChildIndex
in interfaceNode
- Overrides:
jjtGetChildIndex
in classAbstractNode
-
jjtGetChild
public XmlNode jjtGetChild(int index)
- Specified by:
jjtGetChild
in interfaceNode
- Overrides:
jjtGetChild
in classAbstractNode
-
getChild
public Node getChild(int index)
- Specified by:
getChild
in interfaceNode
- Overrides:
getChild
in classAbstractNode
-
jjtGetNumChildren
public int jjtGetNumChildren()
- Specified by:
jjtGetNumChildren
in interfaceNode
- Overrides:
jjtGetNumChildren
in classAbstractNode
-
getNumChildren
public int getNumChildren()
- Specified by:
getNumChildren
in interfaceNode
- Overrides:
getNumChildren
in classAbstractNode
-
jjtGetId
public int jjtGetId()
- Specified by:
jjtGetId
in interfaceNode
- Overrides:
jjtGetId
in classAbstractNode
-
getImage
public String getImage()
- Specified by:
getImage
in interfaceNode
- Overrides:
getImage
in classAbstractNode
-
setImage
public void setImage(String image)
- Specified by:
setImage
in interfaceNode
- Overrides:
setImage
in classAbstractNode
-
hasImageEqualTo
public boolean hasImageEqualTo(String image)
- Specified by:
hasImageEqualTo
in interfaceNode
- Overrides:
hasImageEqualTo
in classAbstractNode
-
getBeginLine
public int getBeginLine()
- Specified by:
getBeginLine
in interfaceNode
- Overrides:
getBeginLine
in classAbstractNode
-
getBeginColumn
public int getBeginColumn()
- Specified by:
getBeginColumn
in interfaceNode
- Overrides:
getBeginColumn
in classAbstractNode
-
getEndLine
public int getEndLine()
- Specified by:
getEndLine
in interfaceNode
- Overrides:
getEndLine
in classAbstractNode
-
getEndColumn
public int getEndColumn()
- Specified by:
getEndColumn
in interfaceNode
- Overrides:
getEndColumn
in classAbstractNode
-
getDataFlowNode
public DataFlowNode getDataFlowNode()
- Specified by:
getDataFlowNode
in interfaceNode
- Overrides:
getDataFlowNode
in classAbstractNode
-
setDataFlowNode
public void setDataFlowNode(DataFlowNode dataFlowNode)
- Specified by:
setDataFlowNode
in interfaceNode
- Overrides:
setDataFlowNode
in classAbstractNode
-
isFindBoundary
public boolean isFindBoundary()
- Specified by:
isFindBoundary
in interfaceNode
- Overrides:
isFindBoundary
in classAbstractNode
-
getAsDocument
public Document getAsDocument()
- Specified by:
getAsDocument
in interfaceNode
- Overrides:
getAsDocument
in classAbstractNode
-
getUserData
public Object getUserData()
- Specified by:
getUserData
in interfaceNode
- Overrides:
getUserData
in classAbstractNode
-
setUserData
public void setUserData(Object userData)
- Specified by:
setUserData
in interfaceNode
- Overrides:
setUserData
in classAbstractNode
-
remove
public void remove()
- Specified by:
remove
in interfaceNode
- Overrides:
remove
in classAbstractNode
-
removeChildAtIndex
public void removeChildAtIndex(int childIndex)
- Specified by:
removeChildAtIndex
in interfaceNode
- Overrides:
removeChildAtIndex
in classAbstractNode
-
getXPathNodeName
public String getXPathNodeName()
- Specified by:
getXPathNodeName
in interfaceNode
- Overrides:
getXPathNodeName
in classAbstractNode
-
toString
public String toString()
- Overrides:
toString
in classAbstractNode
-
getXPathAttributesIterator
public Iterator<Attribute> getXPathAttributesIterator()
- Specified by:
getXPathAttributesIterator
in interfaceNode
- Overrides:
getXPathAttributesIterator
in classAbstractNode
-
getAttributeIterator
@Deprecated public Iterator<Attribute> getAttributeIterator()
Deprecated.- Specified by:
getAttributeIterator
in interfaceAttributeNode
-
-