code: public static ClassDoc[] filterOutPrivateClasses(final ClassDoc[] classes,
                                                       boolean javafx) {
          if (!javafx) {
              return classes;
          }
          final List<ClassDoc> filteredOutClasses =
                  new ArrayList<ClassDoc>(classes.length);
          for (ClassDoc classDoc : classes) {
              if (classDoc.isPrivate() || classDoc.isPackagePrivate()) {
                  continue;
              }
              Tag[] aspTags = classDoc.tags("treatAsPrivate");
              if (aspTags != null && aspTags.length > 0) {
                  continue;
              }
              filteredOutClasses.add(classDoc);
          }
  
          return filteredOutClasses.toArray(new ClassDoc[0]);
      }
docs: In case of JavaFX mode on, filters out classes that are private,
  package private or having the @treatAsPrivate annotation. Those are not
  documented in JavaFX mode.
  
  @param classes array of classes to be filtered.
  @param javafx set to true if in JavaFX mode.
  @return list of filtered classes.