code: private static boolean serialClassInclude(ClassDoc cd) {
          if (cd.isEnum()) {
              return false;
          }
          try {
              cd.superclassType();
          } catch (NullPointerException e) {
              //Workaround for null pointer bug in ClassDoc.superclassType().
              return false;
          }
          if (cd.isSerializable()) {
              if (cd.tags("serial").length > 0) {
                  return serialDocInclude(cd);
              } else if (cd.isPublic() || cd.isProtected()) {
                  return true;
              } else {
                  return false;
              }
          }
          return false;
      }
docs: Return true if the given ClassDoc should be included
  in the serialized form.
  
  @param cd the ClassDoc object to check for serializability.