Set < Archive > archives ( ) { if ( filter . requiresFilter ( ) . isEmpty ( ) ) { return archives . stream ( ) . filter ( this :: include ) . filter ( Archive :: hasDependences ) . collect ( Collectors . toSet ( ) ) ; } else { // use the archives that have dependences and not specified in --require return archives . stream ( ) . filter ( this :: include ) . filter ( source -> ! filter . requiresFilter ( ) . contains ( source . getName ( ) ) ) . filter ( source -> source . getDependencies ( ) . map ( finder :: locationToArchive ) . anyMatch ( a -> a != source ) ) . collect ( Collectors . toSet ( ) ) ; } }
Returns the archives for reporting that has matching dependences .