public void retainFiles ( Collection < ? extends JavaFileObject > sourceFiles ) { for ( Iterator < Env < AttrContext > > it = contents . iterator ( ) ; it . hasNext ( ) ; ) { Env < AttrContext > env = it . next ( ) ; if ( ! sourceFiles . contains ( env . toplevel . sourcefile ) ) { if ( contentsByFile != null ) removeByFile ( env ) ; it . remove ( ) ; } } }
Removes all unattributed classes except those belonging to the given collection of files .