code: private void moveClass(File fromDirectory, String name, File toDirectory) {
      String baseName = getBaseFileName(name);
      File fromClassFile = new File(fromDirectory, baseName + CLASS_EXTENSION);
      File toClassFile = new File(toDirectory, baseName + CLASS_EXTENSION);
      File fromDigestFile = new File(fromDirectory, baseName + DIGEST_EXTENSION);
      File toDigestFile = new File(toDirectory, baseName + DIGEST_EXTENSION);
      File toClassDirectory = toClassFile.getParentFile();
  
      toClassDirectory.mkdirs();
      fromClassFile.renameTo(toClassFile);
      fromDigestFile.renameTo(toDigestFile);
    }
docs: Moves a class definition from the specified directory tree to another
  specified directory tree.
  @param fromDirectory The root of the directory tree from which to move
  the class definition.
  @param name The fully qualified name of the class to move.
  @param toDirectory The root of the directory tree to move the class
  definition to.