code: public String getTypeNameForProfile(ClassDoc cd) {
          StringBuilder typeName =
                  new StringBuilder((cd.containingPackage()).name().replace(".", "/"));
          typeName.append("/")
                  .append(cd.name().replace(".", "$"));
          return typeName.toString();
      }
docs: Get the type name for profile search.
  
  @param cd the classDoc object for which the type name conversion is needed
  @return a type name string for the type