public Collection<FileAnnotation> parse(final File file, final PluginLogger logger) throws IOException {
        Set<FileAnnotation> allAnnotations = Sets.newHashSet();
        for (AbstractWarningsParser parser : parsers) {
            Reader input = null;
            try {
                input = createReader(file);
                Collection<FileAnnotation> warnings = parser.parse(input);
                logger.log(String.format("%s : Found %d warnings.", parser.getParserName(), warnings.size()));
                allAnnotations.addAll(warnings);
            }
            finally {
                IOUtils.closeQuietly(input);
            }
        }
        return applyExcludeFilter(allAnnotations);
    }
public Collection < FileAnnotation > parse ( final File file , final PluginLogger logger ) throws IOException { Set < FileAnnotation > allAnnotations = Sets . newHashSet ( ) ; for ( AbstractWarningsParser parser : parsers ) { Reader input = null ; try { input = createReader ( file ) ; Collection < FileAnnotation > warnings = parser . parse ( input ) ; logger . log ( String . format ( "%s : Found %d warnings." , parser . getParserName ( ) , warnings . size ( ) ) ) ; allAnnotations . addAll ( warnings ) ; } finally { IOUtils . closeQuietly ( input ) ; } } return applyExcludeFilter ( allAnnotations ) ; }
Iterates over the available parsers and parses the specified file with
each parser. Returns all found warnings.

@param file
the input stream
@param logger
the logger to write to
@return all found warnings
@throws IOException
Signals that an I/O exception has occurred.