code: private static boolean isValidJavaClassFile(String file) {
          if (!file.endsWith(".class")) return false;
          String clazzName = file.substring(0, file.length() - ".class".length());
          return isValidClassName(clazzName);
      }
docs: Return true if given file name is a valid class file name.
  @param file the name of the file to check.
  @return true if given file name is a valid class file name
  and false otherwise.