default <P,R>
R
acceptVisitor(AstVisitor<? super P,? extends R> visitor, P data)
Calls back the visitor's visit method corresponding to the runtime type of this Node.
default NodeStream<? extends Node>
ancestors()
Returns a node stream containing all the strict ancestors of this node, in innermost to outermost order.
default <R extends Node>
NodeStream<R>
ancestors(Class<? extends R> rClass)
default NodeStream<? extends Node>
ancestorsOrSelf()
Returns a node stream containing this node and its ancestors.
default NodeStream<? extends Node>
asStream()
Returns a node stream containing only this node.
default NodeStream<? extends Node>
children()
Returns a node stream containing all the children of this node.
default <R extends Node>
NodeStream<R>
children(Class<? extends R> rClass)
default int
compareLocation(Node other)
Compare the coordinates of this node with the other one as if with
COORDS_COMPARATOR
.
default NodeStream.DescendantNodeStream<? extends Node>
descendants()
Returns a node stream containing all the descendants of this node.
default <R extends Node>
NodeStream.DescendantNodeStream<R>
descendants(Class<? extends R> rClass)
default NodeStream.DescendantNodeStream<? extends Node>
descendantsOrSelf()
Returns a node stream containing this node, then all its descendants.
default <R extends Node>
@Nullable R
firstChild(Class<? extends R> rClass)
Returns the first child of this node that has the given type.
default AstInfo<? extends RootNode>
getAstInfo()
Returns the
AstInfo
for this root node.
default int
getBeginColumn()
default int
getBeginLine()
Node
getChild(int index)
Returns the child of this node at the given index.
default int
getEndColumn()
default int
getEndLine()
default @Nullable Node
getFirstChild()
Returns the first child of this node, or null if it doesn't exist.
default String
getImage()
Returns a string token, usually filled-in by the parser, which describes some textual characteristic of this node.
int
getIndexInParent()
Returns the index of this node in its parent's children.
default LanguageVersion
getLanguageVersion()
Returns the language version of this node.
default @Nullable Node
getLastChild()
Returns the first last of this node, or null if it doesn't exist.
default @Nullable Node
getNextSibling()
Returns the next sibling of this node, or null if it does not exist.
int
getNumChildren()
Returns the number of children of this node.
Node
getParent()
Returns the parent of this node, or null if this is the
rootof the tree.
default @Nullable Node
getPreviousSibling()
Returns the previous sibling of this node, or null if it does not exist.
default FileLocation
getReportLocation()
Returns the location at which this element should be reported.
default @NonNull RootNode
getRoot()
Returns the root of the tree this node is declared in.
default @NonNull TextDocument
getTextDocument()
Returns the text document from which this tree was parsed.
TextRegion
getTextRegion()
Returns a region of text delimiting the node in the underlying text document.
DataMap<DataMap.DataKey<?,?>>
getUserMap()
Returns a data map used to store additional information on this node.
default Iterator<Attribute>
getXPathAttributesIterator()
Returns an iterator enumerating all the attributes that are available from XPath for this node.
String
getXPathNodeName()
Gets the name of the node that is used to match it with XPath queries.
default boolean
hasImageEqualTo(String image)
Returns true if this node's image is equal to the given string.
default boolean
isFindBoundary()
Returns true if this node is considered a boundary by traversal methods.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4