Package net.sourceforge.pmd.lang
Class PlainTextLanguage.PlainTextFile
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.impl.AbstractNode<PlainTextLanguage.PlainTextFile,PlainTextLanguage.PlainTextFile>
-
- net.sourceforge.pmd.lang.PlainTextLanguage.PlainTextFile
-
- All Implemented Interfaces:
GenericNode<PlainTextLanguage.PlainTextFile>
,Node
,RootNode
,Reportable
- Enclosing class:
- PlainTextLanguage
public static class PlainTextLanguage.PlainTextFile extends AbstractNode<PlainTextLanguage.PlainTextFile,PlainTextLanguage.PlainTextFile> implements RootNode
The only node produced by the parser ofPlainTextLanguage
.
-
-
Field Summary
-
Fields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AstInfo<? extends RootNode>
getAstInfo()
Returns theAstInfo
for this root node.String
getImage()
Returns a string token, usually filled-in by the parser, which describes some textual characteristic of this node.TextRegion
getTextRegion()
Returns a region of text delimiting the node in the underlying text document.String
getXPathNodeName()
Gets the name of the node that is used to match it with XPath queries.String
toString()
-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.AbstractNode
addChild, children, firstChild, getChild, getIndexInParent, getNumChildren, getParent, getUserMap, insertChild, remove, removeChildAtIndex, setChild, setParent
-
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.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, descendants, descendantsOrSelf, getFirstChild, getLastChild, getNextSibling, getPreviousSibling
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
acceptVisitor, ancestors, children, compareLocation, descendants, firstChild, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getRoot, getTextDocument, getUserMap, getXPathAttributesIterator, hasImageEqualTo, isFindBoundary
-
-
-
-
Method Detail
-
getTextRegion
public TextRegion getTextRegion()
Description copied from interface:Node
Returns a region of text delimiting the node in the underlying text document. This does not necessarily match thereport location
.- Specified by:
getTextRegion
in interfaceNode
-
getXPathNodeName
public String getXPathNodeName()
Description copied from interface:Node
Gets the name of the node that is used to match it with XPath queries.- Specified by:
getXPathNodeName
in interfaceNode
- Returns:
- The XPath node name
-
getImage
public String getImage()
Description copied from interface:Node
Returns 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
.Note: This method will be deprecated in the future (#4787). It will be replaced with methods that have more specific names in node classes. In some cases, there are already alternatives available that should be used.
-
toString
public String toString()
- Overrides:
toString
in classAbstractNode<PlainTextLanguage.PlainTextFile,PlainTextLanguage.PlainTextFile>
-
getAstInfo
public AstInfo<? extends RootNode> getAstInfo()
Description copied from interface:Node
Returns theAstInfo
for this root node.- Specified by:
getAstInfo
in interfaceNode
- Specified by:
getAstInfo
in interfaceRootNode
-
-