aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/html/command/consumers
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-31 20:16:01 +0200
committerGitHub <noreply@github.com>2023-08-31 20:16:01 +0200
commit02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch)
tree66f6d6f089a93b863bf1144666491eca6729ad05 /plugins/base/src/main/kotlin/renderers/html/command/consumers
parent6a181a7a2b03ec263788d137610e86937a57d434 (diff)
downloaddokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip
Enable explicit API mode (#3139)
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/command/consumers')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt10
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt4
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt4
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt4
4 files changed, 12 insertions, 10 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt b/plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt
index 78d684fa..9cde1fca 100644
--- a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/command/consumers/ImmediateResolutionTagConsumer.kt
@@ -15,21 +15,23 @@ import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.query
-class ImmediateResolutionTagConsumer<out R>(
+public class ImmediateResolutionTagConsumer<out R>(
private val downstream: TagConsumer<R>,
private val context: DokkaContext
): TagConsumer<R> by downstream {
- fun processCommand(command: Command, block: TemplateBlock) {
+
+ public fun processCommand(command: Command, block: TemplateBlock) {
context.plugin<DokkaBase>().query { immediateHtmlCommandConsumer }
.find { it.canProcess(command) }
?.processCommand(command, block, this)
?: run { templateCommandFor(command, downstream).visit(block) }
}
- fun processCommandAndFinalize(command: Command, block: TemplateBlock): R =
- context.plugin<DokkaBase>().query { immediateHtmlCommandConsumer }
+ public fun processCommandAndFinalize(command: Command, block: TemplateBlock): R {
+ return context.plugin<DokkaBase>().query { immediateHtmlCommandConsumer }
.find { it.canProcess(command) }
?.processCommandAndFinalize(command, block, this)
?: downstream.templateCommand(command, block)
+ }
}
diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt b/plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt
index a05d7f42..9ac6eb91 100644
--- a/plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/command/consumers/PathToRootConsumer.kt
@@ -10,8 +10,8 @@ import org.jetbrains.dokka.base.templating.Command
import org.jetbrains.dokka.base.templating.ImmediateHtmlCommandConsumer
import org.jetbrains.dokka.base.templating.PathToRootSubstitutionCommand
-object PathToRootConsumer: ImmediateHtmlCommandConsumer {
- override fun canProcess(command: Command) = command is PathToRootSubstitutionCommand
+public object PathToRootConsumer: ImmediateHtmlCommandConsumer {
+ override fun canProcess(command: Command): Boolean = command is PathToRootSubstitutionCommand
override fun <R> processCommand(command: Command, block: TemplateBlock, tagConsumer: ImmediateResolutionTagConsumer<R>) {
command as PathToRootSubstitutionCommand
diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt b/plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt
index bec33799..dd95c202 100644
--- a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/command/consumers/ReplaceVersionsConsumer.kt
@@ -10,8 +10,8 @@ import org.jetbrains.dokka.base.templating.ImmediateHtmlCommandConsumer
import org.jetbrains.dokka.base.templating.ReplaceVersionsCommand
import org.jetbrains.dokka.plugability.DokkaContext
-class ReplaceVersionsConsumer(private val context: DokkaContext) : ImmediateHtmlCommandConsumer {
- override fun canProcess(command: Command) = command is ReplaceVersionsCommand
+public class ReplaceVersionsConsumer(private val context: DokkaContext) : ImmediateHtmlCommandConsumer {
+ override fun canProcess(command: Command): Boolean = command is ReplaceVersionsCommand
override fun <R> processCommand(
command: Command,
diff --git a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt b/plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt
index 25f079d0..292e88b0 100644
--- a/plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/command/consumers/ResolveLinkConsumer.kt
@@ -15,8 +15,8 @@ import org.jetbrains.dokka.base.templating.ImmediateHtmlCommandConsumer
import org.jetbrains.dokka.base.templating.ResolveLinkCommand
import org.jetbrains.dokka.utilities.htmlEscape
-object ResolveLinkConsumer: ImmediateHtmlCommandConsumer {
- override fun canProcess(command: Command) = command is ResolveLinkCommand
+public object ResolveLinkConsumer: ImmediateHtmlCommandConsumer {
+ override fun canProcess(command: Command): Boolean = command is ResolveLinkCommand
override fun <R> processCommand(command: Command, block: TemplateBlock, tagConsumer: ImmediateResolutionTagConsumer<R>) {
command as ResolveLinkCommand