private void writeClassLinks(int context, List list) {
        Object[] typeList = list.toArray();
        //Sort the list to be printed.
        print(' ');
        dd();
        for (int i = 0; i < list.size(); i++) {
            if (i > 0) {
                print(", ");
            }
            if (typeList[i] instanceof ClassDoc) {
                printLink(new LinkInfoImpl(context, (ClassDoc)(typeList[i])));

            } else {
                printLink(new LinkInfoImpl(context, (Type)(typeList[i])));
            }
        }
        ddEnd();
        dlEnd();
    }