Add the index link.

@param builder the deprecated list builder
@param type the type of list being documented
@param contentTree the content tree to which the index link will be added
336522
private void addIndexLink(DeprecatedAPIListBuilder builder,
            int type, Content contentTree) {
        if (builder.hasDocumentation(type)) {
            Content li = HtmlTree.LI(getHyperLink(ANCHORS[type],
                    getResource(HEADING_KEYS[type])));
            contentTree.addContent(li);
        }
    }
833743
protected void addDescription(TypeElement typeElement, Content dlTree, SearchIndexItem si) {
        Content link = getLink(new LinkInfoImpl(configuration,
                        LinkInfoImpl.Kind.INDEX, typeElement).strong(true));
        si.setContainingPackage(utils.getPackageName(utils.containingPackage(typeElement)));
        si.setLabel(utils.getSimpleName(typeElement));
        si.setCategory(resources.getText("doclet.Types"));
        Content dt = HtmlTree.DT(link);
        dt.addContent(" - ");
        addClassInfo(typeElement, dt);
        dlTree.addContent(dt);
        Content dd = new HtmlTree(HtmlTag.DD);
        addComment(typeElement, dd);
        dlTree.addContent(dd);
    }
968998
public void addMemberTags(ExecutableElement member, Content methodsContentTree) {
        Content tagContent = new ContentBuilder();
        TagletManager tagletManager =
            configuration.tagletManager;
        TagletWriter.genTagOutput(tagletManager, member,
            tagletManager.getSerializedFormTaglets(),
            writer.getTagletWriterInstance(false), tagContent);
        Content dlTags = new HtmlTree(HtmlTag.DL);
        dlTags.addContent(tagContent);
        methodsContentTree.addContent(dlTags);
        if (name(member).compareTo("writeExternal") == 0
                && utils.getSerialDataTrees(member).isEmpty()) {
            serialWarning(member, "doclet.MissingSerialDataTag",
                utils.getFullyQualifiedName(member.getEnclosingElement()), name(member));
        }
    }
378872
private static void registerAllTypeFactories(GsonBuilder gsonBuilder) {
        ServiceLoader<TypeAdapterFactory> loader = ServiceLoader.load(TypeAdapterFactory.class);
        for (TypeAdapterFactory typeFactory : loader) {
            if (logger.isLoggable(Level.FINE)) {
                logger.fine("Add gson type factory: " + typeFactory.getClass().getName());
            }
            gsonBuilder.registerTypeAdapterFactory(typeFactory);
        }
    }
589575
public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder(
      int index) {
    return links_.get(index);
  }
995496
protected static final void write(StringBuilder builder, Tree node, Tree zeroIndexes) {
		int startIndex = zeroIndexes == null ? 1 : Integer.MIN_VALUE;
		for (Tree child : node) {
			if (child.isStructure()) {
				write(builder, child, zeroIndexes);
			} else {
				if (startIndex == Integer.MIN_VALUE) {
					startIndex = zeroIndexes.get(node.getName(), 1);
				}
				append(builder, child.getPath(startIndex), String.valueOf(child.asString()));
			}
		}
	}
1028410
public void buildFieldSerializationOverview(TypeElement typeElement, Content classContentTree) {
        if (utils.definesSerializableFields(typeElement)) {
            VariableElement ve = utils.serializableFields(typeElement).first();
            // Check to see if there are inline comments, tags or deprecation
            // information to be printed.
            if (fieldWriter.shouldPrintOverview(ve)) {
                Content serializableFieldsTree = fieldWriter.getSerializableFieldsHeader();
                Content fieldsOverviewContentTree = fieldWriter.getFieldsContentHeader(true);
                fieldWriter.addMemberDeprecatedInfo(ve, fieldsOverviewContentTree);
                if (!configuration.nocomment) {
                    fieldWriter.addMemberDescription(ve, fieldsOverviewContentTree);
                    fieldWriter.addMemberTags(ve, fieldsOverviewContentTree);
                }
                serializableFieldsTree.addContent(fieldsOverviewContentTree);
                classContentTree.addContent(fieldWriter.getSerializableFields(
                        configuration.getText("doclet.Serialized_Form_class"),
                        serializableFieldsTree));
            }
        }
    }
72581
protected void addLinkToMainTree(Content div) {
        Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                getResource("doclet.Package_Hierarchies"));
        div.addContent(span);
        HtmlTree ul = new HtmlTree (HtmlTag.UL);
        ul.addStyle(HtmlStyle.horizontal);
        ul.addContent(getNavLinkMainTree(configuration.getText("doclet.All_Packages")));
        div.addContent(ul);
    }
453507
static void addToObject(final JsonObjectBuilder builder, final String key, final String type, final Function<String, javax.json.JsonValue> defaultBehavior) {
        if (STRING.equals(type)) {
            builder.add(key, "string");
            return;
        }

        if (BOOLEAN.equals(type) || PRIMITIVE_BOOLEAN.equals(type)) {
            builder.add(key, false);
            return;
        }

        // TODO
//        if (INTEGER_TYPES.contains(type)) {
//            builder.add(key, 0);
//            return;
//        }
//
//        if (DOUBLE_TYPES.contains(type)) {
//            builder.add(key, 0.0);
//            return;
//        }
//
//        // plain-old date and JSR-310
//        if (type.isAssignableTo(DATE) || type.isAssignableTo(TEMPORAL_ACCESSOR)) {
//            builder.add(key, "date");
//            return;
//        }
//
//        if (type.isAssignableTo(MAP)) {
//            builder.add(key, Json.createObjectBuilder().build());
//            return;
//        }

        // fall-back
        builder.add(key, defaultBehavior.apply(type));
    }
692434
public void setNodeType(NodeType type) {
        addField(ConfigureNodeFields.node_type, FormField.Type.list_single);
        setAnswer(ConfigureNodeFields.node_type.getFieldName(), getListSingle(type.toString()));
    }
421562
public void indexSourceTree(final Folder rootFolder) {

		logger.info("Starting indexing of source tree " + rootFolder.getPath());

		final SecurityContext securityContext = rootFolder.getSecurityContext();
		app = StructrApp.getInstance(securityContext);

		structrTypeSolver.parseRoot(rootFolder);

		final CombinedTypeSolver typeSolver = new CombinedTypeSolver();
		typeSolver.add(new ReflectionTypeSolver());
		typeSolver.add(structrTypeSolver);

		facade = JavaParserFacade.get(typeSolver);

		logger.info("Done with indexing of source tree " + rootFolder.getPath());
	}
1305233
private void addClassFrameTag(Content contentTree) {
        HtmlTree frame = HtmlTree.IFRAME(configuration.topFile.getPath(), "classFrame",
                configuration.getText("doclet.Package_class_and_interface_descriptions"));
        frame.addStyle(HtmlStyle.rightIframe);
        contentTree.addContent(frame);
    }
1232035
private void addChildNode(final Builder builder, final String name, final Object value) {
        assert !(value instanceof List);

        final Builder childBuilder = new Builder();
        // Set the name of the child node.
        childBuilder.name(name);
        // Set the value of the child node.
        final ImmutableNode childNode = toNode(childBuilder, value);
        // Add the node to the children of the node being built.
        builder.addChild(childNode);
    }
1211507
private void addNthChild(final boolean byType) {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, byType);

			if (specifier.isMatch(index.index+1))
				result.add(node);
		}
	}
1129764
@SuppressWarnings("static-method")
	protected void getLinkForPrimitive(Content link, LinkInfo linkInfo, Type type) {
		link.addContent(type.typeName());
	}
248456
protected void addPackageTreeLinks(Content contentTree) {
        //Do nothing if only unnamed package is used
        if (packages.length == 1 && packages[0].name().length() == 0) {
            return;
        }
        if (!classesonly) {
            Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                    getResource("doclet.Package_Hierarchies"));
            contentTree.addContent(span);
            HtmlTree ul = new HtmlTree(HtmlTag.UL);
            ul.addStyle(HtmlStyle.horizontal);
            for (int i = 0; i < packages.length; i++) {
                // If the package name length is 0 or if -nodeprecated option
                // is set and the package is marked as deprecated, do not include
                // the page in the list of package hierarchies.
                if (packages[i].name().length() == 0 ||
                        (configuration.nodeprecated && Util.isDeprecated(packages[i]))) {
                    continue;
                }
                DocPath link = pathString(packages[i], DocPaths.PACKAGE_TREE);
                Content li = HtmlTree.LI(getHyperLink(
                        link, new StringContent(packages[i].name())));
                if (i < packages.length - 1) {
                    li.addContent(", ");
                }
                ul.addContent(li);
            }
            contentTree.addContent(ul);
        }
    }
1084891
protected void addClassListing(HtmlTree contentTree) {
        List<PackageElement> packagesIn = ElementFilter.packagesIn(mdle.getEnclosedElements());
        SortedSet<TypeElement> interfaces = new TreeSet<>(utils.makeGeneralPurposeComparator());
        SortedSet<TypeElement> classes = new TreeSet<>(utils.makeGeneralPurposeComparator());
        SortedSet<TypeElement> enums = new TreeSet<>(utils.makeGeneralPurposeComparator());
        SortedSet<TypeElement> exceptions = new TreeSet<>(utils.makeGeneralPurposeComparator());
        SortedSet<TypeElement> errors = new TreeSet<>(utils.makeGeneralPurposeComparator());
        SortedSet<TypeElement> annotationTypes = new TreeSet<>(utils.makeGeneralPurposeComparator());
        for (PackageElement pkg : packagesIn) {
            if (utils.isIncluded(pkg)) {
                interfaces.addAll(utils.getInterfaces(pkg));
                classes.addAll(utils.getOrdinaryClasses(pkg));
                enums.addAll(utils.getEnums(pkg));
                exceptions.addAll(utils.getExceptions(pkg));
                errors.addAll(utils.getErrors(pkg));
                annotationTypes.addAll(utils.getAnnotationTypes(pkg));
            }
        }
        addClassKindListing(interfaces, contents.interfaces, contentTree);
        addClassKindListing(classes, contents.classes, contentTree);
        addClassKindListing(enums, contents.enums, contentTree);
        addClassKindListing(exceptions, contents.exceptions, contentTree);
        addClassKindListing(errors, contents.errors, contentTree);
        addClassKindListing(annotationTypes, contents.annotationTypes, contentTree);
    }