code: public List<String> findNames(Class cls, String[] pkgnames) {
      List<String>	result;
      int			i;
      HashSet<String>	names;
  
      result = new ArrayList<>();
  
      names = new HashSet<>();
      for (i = 0; i < pkgnames.length; i++)
        names.addAll(findNamesInPackage(cls, pkgnames[i]));
  
      // sort result
      result.addAll(names);
      Collections.sort(result, new StringCompare());
  
      return result;
    }
docs: Checks the given packages for classes that inherited from the given class,
  in case it's a class, or implement this class, in case it's an interface.
  
  @param cls             the class/interface to look for
  @param pkgnames        the packages to search in
  @return                a list with all the found classnames