src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
equal
deleted
inserted
replaced
27 |
27 |
28 import jdk.javadoc.internal.doclets.formats.html.markup.Head; |
28 import jdk.javadoc.internal.doclets.formats.html.markup.Head; |
29 import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader; |
29 import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader; |
30 |
30 |
31 import java.util.*; |
31 import java.util.*; |
|
32 import java.util.function.Supplier; |
32 import java.util.regex.Matcher; |
33 import java.util.regex.Matcher; |
33 import java.util.regex.Pattern; |
34 import java.util.regex.Pattern; |
34 |
35 |
35 import javax.lang.model.element.AnnotationMirror; |
36 import javax.lang.model.element.AnnotationMirror; |
36 import javax.lang.model.element.AnnotationValue; |
37 import javax.lang.model.element.AnnotationValue; |
2103 } |
2104 } |
2104 |
2105 |
2105 Script getMainBodyScript() { |
2106 Script getMainBodyScript() { |
2106 return mainBodyScript; |
2107 return mainBodyScript; |
2107 } |
2108 } |
|
2109 |
|
2110 /** |
|
2111 * Creates the HTML tag if the tag is supported by this specific HTML version |
|
2112 * otherwise return the Content instance provided by Supplier ifNotSupported. |
|
2113 * @param tag the HTML tag |
|
2114 * @param ifSupported create this instance if HTML tag is supported |
|
2115 * @param ifNotSupported create this instance if HTML tag is not supported |
|
2116 * @return |
|
2117 */ |
|
2118 protected Content createTagIfAllowed(HtmlTag tag, Supplier<Content> ifSupported, Supplier<Content> ifNotSupported) { |
|
2119 if (configuration.allowTag(tag)) { |
|
2120 return ifSupported.get(); |
|
2121 } else { |
|
2122 return ifNotSupported.get(); |
|
2123 } |
|
2124 } |
2108 } |
2125 } |