Class ChildMultiMatcher<T extends com.sun.source.tree.Tree,N extends com.sun.source.tree.Tree>
- Type Parameters:
T- the type of the node to match on
N- the type of the subnode that the given matcher should match
public abstract class ChildMultiMatcher<T extends com.sun.source.tree.Tree,N extends com.sun.source.tree.Tree> extends Object implements MultiMatcher<T,N>
MultiMatcherthat applies a matcher across multiple children of a single ancestor node. Configurable to return true if any of, all of, or the last node matches. In the any or last of cases, provides access to the node that matched.
- email@example.com (Eddie Aftandilian)
- See Also:
- Serialized Form
Nested Class Summary
Nested Classes Modifier and Type Class Description
Modifier and Type Method Description
protected abstract Iterable<? extends N>
T tree, VisitorState state)(Returns the set of child nodes to match.
T tree, VisitorState state)(
T tree, VisitorState state)(Attempt to match the given node, and return the associated subnodes that matched.
nodeMatcherThe matcher to apply to the subnodes in question.
multiMatchResultDescription copied from interface:
MultiMatcherAttempt to match the given node, and return the associated subnodes that matched.
getChildNodesReturns the set of child nodes to match. The nodes must be immediate children of the current node to ensure the TreePath calculation is correct. MultiMatchers with other requirements should not subclass ChildMultiMatcher.