Esempio n. 1
0
 /**
  * Given a class, return the closest visible super class.
  *
  * @param classDoc the class we are searching the parent for.
  * @param configuration the current configuration of the doclet.
  * @return the closest visible super class. Return null if it cannot be found (i.e. classDoc is
  *     java.lang.Object).
  */
 public static ClassDoc getFirstVisibleSuperClassCD(
     ClassDoc classDoc, Configuration configuration) {
   if (classDoc == null) {
     return null;
   }
   ClassDoc supClassDoc = classDoc.superclass();
   while (supClassDoc != null
       && (!(supClassDoc.isPublic() || isLinkable(supClassDoc, configuration)))) {
     supClassDoc = supClassDoc.superclass();
   }
   if (classDoc.equals(supClassDoc)) {
     return null;
   }
   return supClassDoc;
 }
Esempio n. 2
0
 /**
  * Given a class, return the closest visible super class.
  *
  * @param classDoc the class we are searching the parent for.
  * @param configuration the current configuration of the doclet.
  * @return the closest visible super class. Return null if it cannot be found (i.e. classDoc is
  *     java.lang.Object).
  */
 public static Type getFirstVisibleSuperClass(ClassDoc classDoc, Configuration configuration) {
   if (classDoc == null) {
     return null;
   }
   Type sup = classDoc.superclassType();
   ClassDoc supClassDoc = classDoc.superclass();
   while (sup != null && (!(supClassDoc.isPublic() || isLinkable(supClassDoc, configuration)))) {
     if (supClassDoc.superclass().qualifiedName().equals(supClassDoc.qualifiedName())) break;
     sup = supClassDoc.superclassType();
     supClassDoc = supClassDoc.superclass();
   }
   if (classDoc.equals(supClassDoc)) {
     return null;
   }
   return sup;
 }
 /**
  * Add the navigation summary link.
  *
  * @param members members to be linked
  * @param visibleMemberMap the visible inherited members map
  * @param liNav the content tree to which the navigation summary link will be added
  */
 protected void addNavSummaryLink(
     List<?> members, VisibleMemberMap visibleMemberMap, Content liNav) {
   if (members.size() > 0) {
     liNav.addContent(getNavSummaryLink(null, true));
     return;
   }
   ClassDoc icd = classdoc.superclass();
   while (icd != null) {
     List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
     if (inhmembers.size() > 0) {
       liNav.addContent(getNavSummaryLink(icd, true));
       return;
     }
     icd = icd.superclass();
   }
   liNav.addContent(getNavSummaryLink(null, false));
 }