private static Map < String , Integer > findClasses ( Path path ) { List < String > paths = findPaths ( path , true ) ; Map < String , Integer > results = new HashMap <> ( ) ; for ( String subPath : paths ) { if ( subPath . endsWith ( ".java" ) || subPath . endsWith ( ".class" ) ) { String qualifiedName = PathUtil . classFilePathToClassname ( subPath ) ; addClassToMap ( results , qualifiedName ) ; } } return results ; }
Recursively scan the provided path and return a list of all Java packages contained therein .