public static < T extends Tree > Matcher < T > anyOf ( final Iterable < ? extends Matcher < ? super T > > matchers ) { return new Matcher < T > ( ) { @ Override public boolean matches ( T t , VisitorState state ) { for ( Matcher < ? super T > matcher : matchers ) { if ( matcher . matches ( t , state ) ) { return true ; } } return false ; } } ; }
Compose several matchers together such that the composite matches an AST node if any of the given matchers do .