294295296297298299300301302303304
// test ALL if( matcher.appliesToAllPaths() ) { for( Scope scope : scopes ) { if( !matcher.applies( plannerContext, elementGraph, scope ) ) return null; } return scopes; }
305306307308309310311312313314315
if( matcher.appliesToAnyPath() ) { for( Scope scope : scopes ) { if( matcher.applies( plannerContext, elementGraph, scope ) ) return Collections.singleton( scope ); } return null; }
320321322323324325326327328329330
ListIterator<Scope> iterator = scopes.listIterator(); while( iterator.hasNext() ) { if( !matcher.applies( plannerContext, elementGraph, iterator.next() ) ) iterator.remove(); } return scopes.isEmpty() ? null : scopes; }
343344345346347348349350351352353
for( int j = 0; j < scopes.size(); j++ ) { Scope scope = scopes.get( j ); compat[ i ][ j ] = matcher.applies( plannerContext, elementGraph, scope ); } } // all matchers must fire for a given permutation List<Integer> range = new ArrayList<>();