getAncestor<E extends AstNode> method

E getAncestor <E extends AstNode>(
  1. Predicate<AstNode> predicate
)

Return the most immediate ancestor of this node for which the predicate returns true, or null if there is no such ancestor. Note that this node will never be returned.

Implementation

E getAncestor<E extends AstNode>(Predicate<AstNode> predicate);