protected void traverseFile(String annotation, List<Class> classes, File file) {
        if (file.isDirectory()) {
            try (DirectoryStream<Path> dirs = Files.newDirectoryStream(file.toPath())) {
                dirs.forEach(path -> {
                    File f = path.toFile();
                    if (f.isDirectory()) {
                        traverseFile(annotation, classes, f);
                    } else {
                        scanFile(annotation, f, classes);
                    }
                });
            } catch (IOException e) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Ignoring directory [" + file + "] due to I/O error: " + e.getMessage(), e);
                }
            }
        } else {
            scanFile(annotation, file, classes);
        }
    }
protected void traverseFile ( String annotation , List < Class > classes , File file ) { if ( file . isDirectory ( ) ) { try ( DirectoryStream < Path > dirs = Files . newDirectoryStream ( file . toPath ( ) ) ) { dirs . forEach ( path -> { File f = path . toFile ( ) ; if ( f . isDirectory ( ) ) { traverseFile ( annotation , classes , f ) ; } else { scanFile ( annotation , f , classes ) ; } } ) ; } catch ( IOException e ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Ignoring directory [" + file + "] due to I/O error: " + e . getMessage ( ) , e ) ; } } } else { scanFile ( annotation , file , classes ) ; } }
@param annotation The annotation
@param classes    The classes
@param file       The file