Пример #1
0
  /**
   * Add the given class to the given map.
   *
   * @param classdoc the ClassDoc to add to the catelog.
   * @param map the Map to add the ClassDoc to.
   */
  private void addClass(ClassDoc classdoc, Map<String, Set<ClassDoc>> map) {

    PackageDoc pkg = classdoc.containingPackage();
    if (pkg.isIncluded() || (configuration.nodeprecated && Util.isDeprecated(pkg))) {
      // No need to catalog this class if it's package is
      // included on the command line or if -nodeprecated option is set
      // and the containing package is marked as deprecated.
      return;
    }
    String key = Util.getPackageName(pkg);
    Set<ClassDoc> s = map.get(key);
    if (s == null) {
      packageSet.add(key);
      s = new HashSet<ClassDoc>();
    }
    s.add(classdoc);
    map.put(key, s);
  }
Пример #2
0
 /**
  * Add the given class to the catalog.
  *
  * @param classdoc the ClassDoc to add to the catelog.
  */
 public void addClassDoc(ClassDoc classdoc) {
   if (classdoc == null) {
     return;
   }
   addClass(classdoc, allClasses);
   if (classdoc.isOrdinaryClass()) {
     addClass(classdoc, ordinaryClasses);
   } else if (classdoc.isException()) {
     addClass(classdoc, exceptions);
   } else if (classdoc.isEnum()) {
     addClass(classdoc, enums);
   } else if (classdoc.isAnnotationType()) {
     addClass(classdoc, annotationTypes);
   } else if (classdoc.isError()) {
     addClass(classdoc, errors);
   } else if (classdoc.isInterface()) {
     addClass(classdoc, interfaces);
   }
 }