A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pmd-code.org/apidocs/pmd-core/7.0.0-rc2/net/sourceforge/pmd/lang/ast/Node.html below:

Node (PMD Core 7.0.0-rc2 API)

Modifier and Type Method Description 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 List<Node> findChildNodesWithXPath​(String xpathString) default <T extends Node>
List<T>
findChildrenOfType​(Class<? extends T> childType) default <T extends Node>
List<T>
findDescendantsOfType​(Class<? extends T> targetType) default <T extends Node>
List<T>
findDescendantsOfType​(Class<? extends T> targetType, boolean crossFindBoundaries) 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()

Gets the column offset from the start of the begin line where the token's region begins

default int getBeginLine()

Gets the line where the token's region begins

Node getChild​(int index)

Returns the child of this node at the given index.

default int getEndColumn()

Gets the column offset from the start of the end line where the token's region ends

default int getEndLine()

Gets the line where the token's region ends

default @Nullable Node getFirstChild()

Returns the first child of this node, or null if it doesn't exist.

default <T extends Node>
T
getFirstChildOfType​(Class<? extends T> childType) default <T extends Node>
T
getFirstDescendantOfType​(Class<? extends T> descendantType) default <T extends Node>
T
getFirstParentOfType​(Class<? extends T> parentType) default String getImage() 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.

default Node getNthParent​(int n) int getNumChildren()

Returns the number of children of this node.

Node getParent()

Returns the parent of this node, or null if this is the

root

of the tree.

default <T extends Node>
List<T>
getParentsOfType​(Class<? extends T> parentType) 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 <T extends Node>
boolean
hasDescendantOfType​(Class<? extends T> type) default boolean hasImageEqualTo​(String image) 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