class RequestedDependenciesHelpDocumentCustomizer implements HelpDocumentCustomizer {

	private final ProjectDescription description;

	private final InitializrMetadata metadata;

	private final String platformVersion;

	public RequestedDependenciesHelpDocumentCustomizer(ProjectDescription description, InitializrMetadata metadata) {
		this.description = description;
		this.metadata = metadata;
		this.platformVersion = (description.getPlatformVersion() != null) ? description.getPlatformVersion().toString()
				: metadata.getBootVersions().getDefault().getId();
	}

	@Override
	public void customize(HelpDocument document) {
		this.description.getRequestedDependencies().forEach((id, dependency) -> {
			Dependency dependencyMetadata = this.metadata.getDependencies().get(id);
			if (dependencyMetadata != null) {
				handleDependency(document, dependencyMetadata);
			}
		});
	}

	@Override
	public int getOrder() {
		return Ordered.LOWEST_PRECEDENCE;
	}

	private void handleDependency(HelpDocument document, Dependency dependency) {
		GettingStartedSection gettingStartedSection = document.gettingStarted();
		MultiValueMap<GuideType, Link> indexedLinks = indexLinks(dependency);
		registerLinks(indexedLinks.get(GuideType.REFERENCE), defaultLinkDescription(dependency),
				gettingStartedSection::referenceDocs);
		registerLinks(indexedLinks.get(GuideType.GUIDE), defaultLinkDescription(dependency),
				gettingStartedSection::guides);
		registerLinks(indexedLinks.get(GuideType.OTHER), (links) -> null, gettingStartedSection::additionalLinks);
	}

	private void registerLinks(List<Link> links, Function<List<Link>, String> defaultDescription,
			Supplier<BulletedSection<GettingStartedSection.Link>> section) {
		if (ObjectUtils.isEmpty(links)) {
			return;
		}
		links.forEach((link) -> {
			if (link.getHref() != null) {
				String description = (link.getDescription() != null) ? link.getDescription()
						: defaultDescription.apply(links);
				if (description != null) {
					String url = link.getHref().replace("{bootVersion}", this.platformVersion);
					section.get().addItem(new GettingStartedSection.Link(url, description));
				}
			}
		});
	}

	private Function<List<Link>, String> defaultLinkDescription(Dependency dependency) {
		return (links) -> (links.size() == 1) ? dependency.getName() : null;
	}

	private MultiValueMap<GuideType, Link> indexLinks(Dependency dependency) {<FILL_FUNCTION_BODY>}

	private enum GuideType {

		REFERENCE, GUIDE, OTHER

	}

}

		MultiValueMap<GuideType, Link> links = new LinkedMultiValueMap<>();
		dependency.getLinks().forEach((link) -> {
			if ("reference".equals(link.getRel())) {
				links.add(GuideType.REFERENCE, link);
			}
			else if ("guide".equals(link.getRel())) {
				links.add(GuideType.GUIDE, link);
			}
			else {
				links.add(GuideType.OTHER, link);
			}
		});
		return links;
	
<no_super_class>