public final class PrefetchHtmlFormatter extends Object
PrefetchHtmlFormatter according
to each URL type and generating an URL as <link rel="prefetch" href="theurl">.| Modifier and Type | Method and Description |
|---|---|
String |
format(ResourceUrls resourceUrls)
Converts a certain resource into html import tag and format it according to its url extension.
|
static PrefetchHtmlFormatter |
getInstance(UrlMode urlMode) |
boolean |
matches(String resourceName)
Identifies whether the extesion handlded by the formater matches the resource name.
|
@Nonnull public static PrefetchHtmlFormatter getInstance(@Nonnull UrlMode urlMode)
@Nonnull public String format(@Nonnull ResourceUrls resourceUrls)
resourceUrls - The resource to be formatted.public boolean matches(@Nonnull String resourceName)
resourceName - The resource name.true: The resouerce name matches the formatter's.
false: The resouerce name does not match the formatter's.
Copyright © 2024 Atlassian. All rights reserved.