/** * Construct a new ConstructorWriterImpl. * * @param writer The writer for the class that the constructors belong to. * @param classDoc the class being documented. */ public ConstructorWriterImpl(SubWriterHolderWriter writer, ClassDoc classDoc) { super(writer, classDoc); VisibleMemberMap visibleMemberMap = new VisibleMemberMap(classDoc, VisibleMemberMap.CONSTRUCTORS, configuration); List<ProgramElementDoc> constructors = new ArrayList<>(visibleMemberMap.getMembersFor(classDoc)); for (ProgramElementDoc constructor : constructors) { if (constructor.isProtected() || constructor.isPrivate()) { setFoundNonPubConstructor(true); } } }
/** * 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)); }