private void parsePackageClasses(String name,
            List<JavaFileObject> files,
            ListBuffer<JCCompilationUnit> trees,
            List<String> excludedPackages)
            throws IOException {
        if (excludedPackages.contains(name)) {
            return;
        }

        docenv.notice("main.Loading_source_files_for_package", name);

        if (files == null) {
            Location location = docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH)
                    ? StandardLocation.SOURCE_PATH : StandardLocation.CLASS_PATH;
            ListBuffer<JavaFileObject> lb = new ListBuffer<JavaFileObject>();
            for (JavaFileObject fo: docenv.fileManager.list(
                    location, name, EnumSet.of(JavaFileObject.Kind.SOURCE), false)) {
                String binaryName = docenv.fileManager.inferBinaryName(location, fo);
                String simpleName = getSimpleName(binaryName);
                if (isValidClassName(simpleName)) {
                    lb.append(fo);
                }
            }
            files = lb.toList();
        }
        if (files.nonEmpty()) {
            for (JavaFileObject fo : files) {
                parse(fo, trees, false);
            }
        } else {
            messager.warning(Messager.NOPOS, "main.no_source_files_for_package",
                             name.replace(File.separatorChar, '.'));
        }
    }
private void parsePackageClasses ( String name , List < JavaFileObject > files , ListBuffer < JCCompilationUnit > trees , List < String > excludedPackages ) throws IOException { if ( excludedPackages . contains ( name ) ) { return ; } docenv . notice ( "main.Loading_source_files_for_package" , name ) ; if ( files == null ) { Location location = docenv . fileManager . hasLocation ( StandardLocation . SOURCE_PATH ) ? StandardLocation . SOURCE_PATH : StandardLocation . CLASS_PATH ; ListBuffer < JavaFileObject > lb = new ListBuffer < JavaFileObject > ( ) ; for ( JavaFileObject fo : docenv . fileManager . list ( location , name , EnumSet . of ( JavaFileObject . Kind . SOURCE ) , false ) ) { String binaryName = docenv . fileManager . inferBinaryName ( location , fo ) ; String simpleName = getSimpleName ( binaryName ) ; if ( isValidClassName ( simpleName ) ) { lb . append ( fo ) ; } } files = lb . toList ( ) ; } if ( files . nonEmpty ( ) ) { for ( JavaFileObject fo : files ) { parse ( fo , trees , false ) ; } } else { messager . warning ( Messager . NOPOS , "main.no_source_files_for_package" , name . replace ( File . separatorChar , '.' ) ) ; } }
search all directories in path for subdirectory name. Add all
.java files found in such a directory to args.