Uses of Interface
net.sourceforge.pmd.lang.ast.NodeStream
Packages that use NodeStream
Package
Description
Logic about reporting: violations, suppression etc.
-
Uses of NodeStream in net.sourceforge.pmd.lang.ast
Subinterfaces of NodeStream in net.sourceforge.pmd.lang.astModifier and TypeInterfaceDescriptionstatic interfaceNodeStream.DescendantNodeStream<T extends Node>A specialization ofNodeStreamthat allows configuring tree traversal behaviour when traversing the descendants of a node.Methods in net.sourceforge.pmd.lang.ast that return NodeStreamModifier and TypeMethodDescriptiondefault NodeStream<? extends Node>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>Returns the ancestor stream of this node filtered by the given node type.default NodeStream<Node>NodeStream.ancestors()Returns a node stream containing all the ancestors of the nodes contained in this stream.default <R extends Node>
NodeStream<R>Returns the ancestor stream of each node in this stream, filtered by the given node type.default NodeStream<? extends Node>Node.ancestorsOrSelf()Returns a node stream containing this node and its ancestors.default NodeStream<Node>NodeStream.ancestorsOrSelf()Returns a node stream containing the nodes contained in this stream and their ancestors.NodeStream.append(NodeStream<? extends @NonNull T> right) Returns a new node stream that contains all the elements of this stream, then all the elements of the given stream.default NodeStream<? extends Node>Node.asStream()Returns a node stream containing only this node.NodeStream.cached()Returns a node stream containing all the elements of this node stream, but which will evaluate the upstream pipeline only once.default NodeStream<? extends Node>Node.children()Returns a node stream containing all the children of this node.default <R extends Node>
NodeStream<R>Returns a node stream of the children of this node that are of the given type.default NodeStream<Node>NodeStream.children()Returns a node stream containing all the children of the nodes contained in this stream.default <R extends Node>
NodeStream<R>Returns the children stream of each node in this stream, filtered by the given node type.NodeStream.distinct()Returns a stream consisting of the distinct elements (w.r.tObject.equals(Object)) of this stream.NodeStream.drop(int n) Returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream.NodeStream.dropLast(int n) Returns a stream consisting of the elements of this stream except the n tail elements.static <T extends Node>
NodeStream<T>NodeStream.empty()Returns an empty node stream.Returns a node stream consisting of the nodes of this stream that match the given predicate.default <R extends Node>
NodeStream<R>Filters the nodes of this stream that are a subtype of the given class.default <U> NodeStream<T>NodeStream.filterMatching(Function<? super @NonNull T, ? extends @Nullable U> extractor, U comparand) Filters the nodes of this stream by comparing a value extracted from the nodes with the given constant.default NodeStream<T>Filters the node of this stream using the negation of the given predicate.default <U> NodeStream<T>NodeStream.filterNotMatching(Function<? super @NonNull T, ? extends @Nullable U> extractor, U comparand) Inverse offilterMatching(Function, Object).default <R extends Node>
NodeStream<R>NodeStream.firstChild(Class<? extends R> rClass) Returns a stream containing the first child of each of the nodes in this stream that has the given type.<R extends Node>
NodeStream<R>NodeStream.flatMap(Function<? super @NonNull T, ? extends @Nullable NodeStream<? extends R>> mapper) Returns a node stream consisting of the results of replacing each node of this stream with the contents of a stream produced by the given mapping function.default NodeStream<Node>NodeStream.followingSiblings()Returns a node stream containing all the following siblings of the nodes contained in this stream.static <T extends Node,R extends Node>
NodeStream<R>NodeStream.forkJoin(NodeStream<? extends T> upstream, Function<? super @NonNull T, ? extends NodeStream<? extends R>> fst, Function<? super @NonNull T, ? extends NodeStream<? extends R>> snd, Function<? super @NonNull T, ? extends NodeStream<? extends R>>... rest) Applies the given mapping functions to the given upstream in order and merges the results into a new node stream.static <T extends Node>
NodeStream<T>NodeStream.fromIterable(Iterable<? extends @Nullable T> iterable) Returns a new node stream that contains the same elements as the given iterable.<R extends Node>
NodeStream<R>Returns a node stream consisting of the results of applying the given mapping function to the node of this stream.static <T extends Node>
NodeStream<T>NodeStream.of(@Nullable T node) Returns a node stream containing zero or one node, depending on whether the argument is null or not.static <T extends Node>
NodeStream<T>NodeStream.of(T... nodes) Returns a node stream whose elements are the given nodes in order.static <T extends Node>
NodeStream<T>NodeStream.ofOptional(Optional<? extends T> optNode) Returns a node stream containing zero or one node, depending on whether the optional is empty or not.default NodeStream<Node>NodeStream.parents()Returns a node stream containing all the (first-degree) parents of the nodes contained in this stream.Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.default NodeStream<Node>NodeStream.precedingSiblings()Returns a node stream containing all the preceding siblings of the nodes contained in this stream.NodeStream.prepend(NodeStream<? extends @NonNull T> right) Returns a new node stream that contains all the elements of the given stream, then all the elements of this stream.NodeStream.take(int maxSize) Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length.Returns the longest prefix of elements that satisfy the given predicate.static <T extends Node>
NodeStream<T>NodeStream.union(Iterable<? extends NodeStream<? extends T>> streams) Returns a node stream containing all the elements of the given streams, one after the other.static <T extends Node>
NodeStream<T>NodeStream.union(NodeStream<? extends T>... streams) Returns a node stream containing all the elements of the given streams, one after the other.Methods in net.sourceforge.pmd.lang.ast with parameters of type NodeStreamModifier and TypeMethodDescriptionNodeStream.append(NodeStream<? extends @NonNull T> right) Returns a new node stream that contains all the elements of this stream, then all the elements of the given stream.static <T extends Node,R extends Node>
NodeStream<R>NodeStream.forkJoin(NodeStream<? extends T> upstream, Function<? super @NonNull T, ? extends NodeStream<? extends R>> fst, Function<? super @NonNull T, ? extends NodeStream<? extends R>> snd, Function<? super @NonNull T, ? extends NodeStream<? extends R>>... rest) Applies the given mapping functions to the given upstream in order and merges the results into a new node stream.NodeStream.prepend(NodeStream<? extends @NonNull T> right) Returns a new node stream that contains all the elements of the given stream, then all the elements of this stream.static <T extends Node>
NodeStream<T>NodeStream.union(NodeStream<? extends T>... streams) Returns a node stream containing all the elements of the given streams, one after the other.Method parameters in net.sourceforge.pmd.lang.ast with type arguments of type NodeStreamModifier and TypeMethodDescription<R extends Node>
NodeStream<R>NodeStream.flatMap(Function<? super @NonNull T, ? extends @Nullable NodeStream<? extends R>> mapper) Returns a node stream consisting of the results of replacing each node of this stream with the contents of a stream produced by the given mapping function.static <T extends Node,R extends Node>
NodeStream<R>NodeStream.forkJoin(NodeStream<? extends T> upstream, Function<? super @NonNull T, ? extends NodeStream<? extends R>> fst, Function<? super @NonNull T, ? extends NodeStream<? extends R>> snd, Function<? super @NonNull T, ? extends NodeStream<? extends R>>... rest) Applies the given mapping functions to the given upstream in order and merges the results into a new node stream.static <T extends Node>
NodeStream<T>NodeStream.union(Iterable<? extends NodeStream<? extends T>> streams) Returns a node stream containing all the elements of the given streams, one after the other. -
Uses of NodeStream in net.sourceforge.pmd.lang.ast.impl
Methods in net.sourceforge.pmd.lang.ast.impl that return NodeStreamModifier and TypeMethodDescriptiondefault NodeStream<N>GenericNode.ancestors()default NodeStream<N>GenericNode.ancestorsOrSelf()default NodeStream<N>GenericNode.asStream()final NodeStream<N>AbstractNode.children()default NodeStream<N>GenericNode.children() -
Uses of NodeStream in net.sourceforge.pmd.reporting
Methods in net.sourceforge.pmd.reporting that return NodeStreamModifier and TypeMethodDescriptionprotected abstract NodeStream<A>AbstractAnnotationSuppressor.getAnnotations(Node n) Return the annotations attached to the given node.