docs: protected void scanDir(File srcDir, File destDir, String[] files) {
          GlobPatternMapper m = new GlobPatternMapper();
          SourceFileScanner sfs = new SourceFileScanner(this);
          File[] newFiles;
          for (String extension : getScriptExtensions()) {
              m.setFrom("*." + extension);
              m.setTo("*.class");
              newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m);
              addToCompileList(newFiles);
          }
  
          if (jointCompilation) {
              m.setFrom("*.java");
              m.setTo("*.class");
              newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m);
              addToCompileList(newFiles);
          }
      }