src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java

changeset 184
905e151a185a
parent 182
47a62d8d98b4
child 233
5240b1120530
equal deleted inserted replaced
183:dbe9e82f9d25 184:905e151a185a
353 if (classDoc.isClass()) { 353 if (classDoc.isClass()) {
354 if (classDoc.qualifiedName().equals("java.lang.Object") || 354 if (classDoc.qualifiedName().equals("java.lang.Object") ||
355 classDoc.qualifiedName().equals("org.omg.CORBA.Object")) { 355 classDoc.qualifiedName().equals("org.omg.CORBA.Object")) {
356 return; // Don't generate the list, too huge 356 return; // Don't generate the list, too huge
357 } 357 }
358 List subclasses = classtree.subs(classDoc, false); 358 List<ClassDoc> subclasses = classtree.subs(classDoc, false);
359 if (subclasses.size() > 0) { 359 if (subclasses.size() > 0) {
360 dl(); 360 dl();
361 dt(); 361 dt();
362 strongText("doclet.Subclasses"); 362 strongText("doclet.Subclasses");
363 writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES, 363 writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES,
369 /** 369 /**
370 * {@inheritDoc} 370 * {@inheritDoc}
371 */ 371 */
372 public void writeSubInterfacesInfo() { 372 public void writeSubInterfacesInfo() {
373 if (classDoc.isInterface()) { 373 if (classDoc.isInterface()) {
374 List subInterfaces = classtree.allSubs(classDoc, false); 374 List<ClassDoc> subInterfaces = classtree.allSubs(classDoc, false);
375 if (subInterfaces.size() > 0) { 375 if (subInterfaces.size() > 0) {
376 dl(); 376 dl();
377 dt(); 377 dt();
378 strongText("doclet.Subinterfaces"); 378 strongText("doclet.Subinterfaces");
379 writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES, 379 writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES,
391 } 391 }
392 if (classDoc.qualifiedName().equals("java.lang.Cloneable") || 392 if (classDoc.qualifiedName().equals("java.lang.Cloneable") ||
393 classDoc.qualifiedName().equals("java.io.Serializable")) { 393 classDoc.qualifiedName().equals("java.io.Serializable")) {
394 return; // Don't generate the list, too big 394 return; // Don't generate the list, too big
395 } 395 }
396 List implcl = classtree.implementingclasses(classDoc); 396 List<ClassDoc> implcl = classtree.implementingclasses(classDoc);
397 if (implcl.size() > 0) { 397 if (implcl.size() > 0) {
398 dl(); 398 dl();
399 dt(); 399 dt();
400 strongText("doclet.Implementing_Classes"); 400 strongText("doclet.Implementing_Classes");
401 writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES, 401 writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES,
407 * {@inheritDoc} 407 * {@inheritDoc}
408 */ 408 */
409 public void writeImplementedInterfacesInfo() { 409 public void writeImplementedInterfacesInfo() {
410 //NOTE: we really should be using ClassDoc.interfaceTypes() here, but 410 //NOTE: we really should be using ClassDoc.interfaceTypes() here, but
411 // it doesn't walk up the tree like we want it to. 411 // it doesn't walk up the tree like we want it to.
412 List interfaceArray = Util.getAllInterfaces(classDoc, configuration); 412 List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
413 if (classDoc.isClass() && interfaceArray.size() > 0) { 413 if (classDoc.isClass() && interfaceArray.size() > 0) {
414 dl(); 414 dl();
415 dt(); 415 dt();
416 strongText("doclet.All_Implemented_Interfaces"); 416 strongText("doclet.All_Implemented_Interfaces");
417 writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES, 417 writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES,
423 * {@inheritDoc} 423 * {@inheritDoc}
424 */ 424 */
425 public void writeSuperInterfacesInfo() { 425 public void writeSuperInterfacesInfo() {
426 //NOTE: we really should be using ClassDoc.interfaceTypes() here, but 426 //NOTE: we really should be using ClassDoc.interfaceTypes() here, but
427 // it doesn't walk up the tree like we want it to. 427 // it doesn't walk up the tree like we want it to.
428 List interfaceArray = Util.getAllInterfaces(classDoc, configuration); 428 List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
429 if (classDoc.isInterface() && interfaceArray.size() > 0) { 429 if (classDoc.isInterface() && interfaceArray.size() > 0) {
430 dl(); 430 dl();
431 dt(); 431 dt();
432 strongText("doclet.All_Superinterfaces"); 432 strongText("doclet.All_Superinterfaces");
433 writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES, 433 writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES,
436 } 436 }
437 437
438 /** 438 /**
439 * Generate links to the given classes. 439 * Generate links to the given classes.
440 */ 440 */
441 private void writeClassLinks(int context, List list) { 441 private void writeClassLinks(int context, List<?> list) {
442 Object[] typeList = list.toArray(); 442 Object[] typeList = list.toArray();
443 //Sort the list to be printed. 443 //Sort the list to be printed.
444 print(' '); 444 print(' ');
445 dd(); 445 dd();
446 for (int i = 0; i < list.size(); i++) { 446 for (int i = 0; i < list.size(); i++) {

mercurial