Package net.sourceforge.pmd.lang
Class PlainTextLanguage.PlainTextFile
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.AbstractNode
-
- net.sourceforge.pmd.lang.PlainTextLanguage.PlainTextFile
-
- Enclosing class:
- PlainTextLanguage
public static final class PlainTextLanguage.PlainTextFile extends AbstractNode implements RootNode
The only node produced by the parser ofPlainTextLanguage.
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
beginColumn, beginLine, childIndex, children, endColumn, endLine, firstToken, id, lastToken, parent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetImage()Returns a string token, usually filled-in by the parser, which describes some textual characteristic of this node.StringgetXPathNodeName()Gets the name of the node that is used to match it with XPath queries.voidremove()Remove the current node from its parent.voidremoveChildAtIndex(int childIndex)This method tells the node to remove the child node at the given index from the node's list of children, if any; if not, no changes are done.voidsetImage(String image)StringtoString()-
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, children, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getChild, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getIndexInParent, getNthParent, getNumChildren, getParent, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, setDataFlowNode, setUserData, 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, getAsDocument, getBeginColumn, getBeginLine, getChild, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getIndexInParent, getNthParent, getNumChildren, getParent, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, setDataFlowNode, setUserData
-
-
-
-
Method Detail
-
getXPathNodeName
public String getXPathNodeName()
Description copied from class:AbstractNodeGets the name of the node that is used to match it with XPath queries.This default implementation adds compatibility with the previous way to get the xpath node name, which used
Object.toString().Please override it. It will be removed in version 7.0.0.
- Specified by:
getXPathNodeNamein interfaceNode- Overrides:
getXPathNodeNamein classAbstractNode- Returns:
- The XPath node name
-
getImage
public String getImage()
Description copied from interface:NodeReturns a string token, usually filled-in by the parser, which describes some textual characteristic of this node. This is usually an identifier, but you should check that using the Designer. On most nodes though, this method returnsnull.- Specified by:
getImagein interfaceNode- Overrides:
getImagein classAbstractNode
-
setImage
public void setImage(String image)
- Specified by:
setImagein interfaceNode- Overrides:
setImagein classAbstractNode
-
remove
public void remove()
Description copied from interface:NodeRemove the current node from its parent.- Specified by:
removein interfaceNode- Overrides:
removein classAbstractNode
-
removeChildAtIndex
public void removeChildAtIndex(int childIndex)
Description copied from interface:NodeThis method tells the node to remove the child node at the given index from the node's list of children, if any; if not, no changes are done.- Specified by:
removeChildAtIndexin interfaceNode- Overrides:
removeChildAtIndexin classAbstractNode- Parameters:
childIndex- The index of the child to be removed
-
toString
public String toString()
- Overrides:
toStringin classAbstractNode
-
-