FileSetUtils { public static Map< String, IPackage > computeAsts( final Map< String, IFlexFile > files ) throws PMDException { final Map< String, IPackage > asts = new LinkedHashMap< String, IPackage >(); for ( final Entry< String, IFlexFile > fileEntry : files.entrySet() ) { final IFlexFile file = fileEntry.getValue(); try { final IParserNode node = buildThreadedAst( file ); asts.put( file.getFullyQualifiedName(), NodeFactory.createPackage( node ) ); } catch ( final InterruptedException e ) { LOGGER.warning( buildLogMessage( file, e.getMessage() ) ); } catch ( final NoClassDefFoundError e ) { LOGGER.warning( buildLogMessage( file, e.getMessage() ) ); } catch ( final ExecutionException e ) { LOGGER.warning( buildLogMessage( file, e.getMessage() ) ); } catch ( final CancellationException e ) { LOGGER.warning( buildLogMessage( file, e.getMessage() ) ); } } return asts; } private  FileSetUtils(); static IParserNode buildAst( final IFlexFile file ); static IParserNode buildThreadedAst( final IFlexFile file ); static Map< String, IPackage > computeAsts( final Map< String, IFlexFile > files );  }
@Test public void testComputeAsts() throws PMDException { FileSetUtils.computeAsts( getTestFiles() ); }