code: private void buildDeprecatedAPIInfo(Configuration configuration) {
          PackageDoc[] packages = configuration.packages;
          PackageDoc pkg;
          for (int c = 0; c < packages.length; c++) {
              pkg = packages[c];
              if (Util.isDeprecated(pkg)) {
                  getList(PACKAGE).add(pkg);
              }
          }
          ClassDoc[] classes = configuration.root.classes();
          for (int i = 0; i < classes.length; i++) {
              ClassDoc cd = classes[i];
              if (Util.isDeprecated(cd)) {
                  if (cd.isOrdinaryClass()) {
                      getList(CLASS).add(cd);
                  } else if (cd.isInterface()) {
                      getList(INTERFACE).add(cd);
                  } else if (cd.isException()) {
                      getList(EXCEPTION).add(cd);
                  } else if (cd.isEnum()) {
                      getList(ENUM).add(cd);
                  } else if (cd.isError()) {
                      getList(ERROR).add(cd);
                  } else if (cd.isAnnotationType()) {
                      getList(ANNOTATION_TYPE).add(cd);
                  }
              }
              composeDeprecatedList(getList(FIELD), cd.fields());
              composeDeprecatedList(getList(METHOD), cd.methods());
              composeDeprecatedList(getList(CONSTRUCTOR), cd.constructors());
              if (cd.isEnum()) {
                  composeDeprecatedList(getList(ENUM_CONSTANT), cd.enumConstants());
              }
              if (cd.isAnnotationType()) {
                  composeDeprecatedList(getList(ANNOTATION_TYPE_MEMBER),
                          ((AnnotationTypeDoc) cd).elements());
              }
          }
          sortDeprecatedLists();
      }
docs: Build the sorted list of all the deprecated APIs in this run.
  Build separate lists for deprecated packages, classes, constructors,
  methods and fields.
  
  @param configuration the current configuration of the doclet.