public boolean hasAnySubexpressionWithPredicate ( SubexprFinderPredicate pred ) { if ( pred . matches ( this ) ) { return true ; } if ( m_left != null && m_left . hasAnySubexpressionWithPredicate ( pred ) ) { return true ; } if ( m_right != null && m_right . hasAnySubexpressionWithPredicate ( pred ) ) { return true ; } if ( m_args != null ) { for ( AbstractExpression argument : m_args ) { if ( argument . hasAnySubexpressionWithPredicate ( pred ) ) { return true ; } } } return false ; }
Searches the expression tree rooted at this for nodes for which pred evaluates to true .