code: public static String[] getDirs(final FilenameFilter aFilter) {
          final ArrayList<String> list = new ArrayList<>();
  
          for (final String filename : System.getProperty(CLASSPATH).split(DELIMETER)) {
              final File file = new File(filename);
  
              if (aFilter.accept(file.getParentFile(), file.getName()) && file.isDirectory()) {
                  list.add(file.getAbsolutePath());
              }
          }
  
          return list.toArray(new String[0]);
      }
docs: Returns an String array of all the directory names in the system classpath that match the supplied
  <code>FilenameFilter</code>
  
  @param aFilter A filter to use while retrieving directories
  @return The names of directories from the system classpath that match the supplied <code>FilenameFilter</code>