aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/configuration.kt2
-rw-r--r--core/src/main/kotlin/plugability/DokkaContext.kt2
-rw-r--r--core/src/main/kotlin/renderers/PostAction.kt2
-rw-r--r--core/src/main/kotlin/renderers/Renderer.kt2
-rw-r--r--core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt2
-rw-r--r--core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt2
-rw-r--r--core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt2
-rw-r--r--core/src/main/kotlin/transformers/pages/PageTransformer.kt2
-rw-r--r--core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt12
-rw-r--r--core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt2
-rw-r--r--core/src/main/kotlin/validity/PreGenerationChecker.kt2
11 files changed, 13 insertions, 19 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt
index ebd6ed61..c7feb22e 100644
--- a/core/src/main/kotlin/configuration.kt
+++ b/core/src/main/kotlin/configuration.kt
@@ -61,7 +61,7 @@ enum class Platform(val key: String) {
}
}
-interface DokkaConfigurationBuilder<T : Any> {
+fun interface DokkaConfigurationBuilder<T : Any> {
fun build(): T
}
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt
index f8aa5969..06efeb1a 100644
--- a/core/src/main/kotlin/plugability/DokkaContext.kt
+++ b/core/src/main/kotlin/plugability/DokkaContext.kt
@@ -43,7 +43,7 @@ interface DokkaContext {
inline fun <reified T : DokkaPlugin> DokkaContext.plugin(): T = plugin(T::class)
?: throw java.lang.IllegalStateException("Plugin ${T::class.qualifiedName} is not present in context.")
-interface DokkaContextConfiguration {
+fun interface DokkaContextConfiguration {
fun installExtension(extension: Extension<*, *, *>)
}
diff --git a/core/src/main/kotlin/renderers/PostAction.kt b/core/src/main/kotlin/renderers/PostAction.kt
index e47d5d22..4237c6df 100644
--- a/core/src/main/kotlin/renderers/PostAction.kt
+++ b/core/src/main/kotlin/renderers/PostAction.kt
@@ -1,3 +1,3 @@
package org.jetbrains.dokka.renderers
-interface PostAction : () -> Unit \ No newline at end of file
+fun interface PostAction : () -> Unit \ No newline at end of file
diff --git a/core/src/main/kotlin/renderers/Renderer.kt b/core/src/main/kotlin/renderers/Renderer.kt
index 10235f21..73b08067 100644
--- a/core/src/main/kotlin/renderers/Renderer.kt
+++ b/core/src/main/kotlin/renderers/Renderer.kt
@@ -2,6 +2,6 @@ package org.jetbrains.dokka.renderers
import org.jetbrains.dokka.pages.RootPageNode
-interface Renderer {
+fun interface Renderer {
fun render(root: RootPageNode)
} \ No newline at end of file
diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt b/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt
index aa878873..358fdb1d 100644
--- a/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt
+++ b/core/src/main/kotlin/transformers/documentation/DocumentableMerger.kt
@@ -3,6 +3,6 @@ package org.jetbrains.dokka.transformers.documentation
import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.plugability.DokkaContext
-interface DocumentableMerger {
+fun interface DocumentableMerger {
operator fun invoke(modules: Collection<DModule>): DModule?
} \ No newline at end of file
diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt b/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt
index a4daba63..f8005cfe 100644
--- a/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt
+++ b/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt
@@ -4,6 +4,6 @@ import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.pages.ModulePageNode
import org.jetbrains.dokka.pages.RootPageNode
-interface DocumentableToPageTranslator {
+fun interface DocumentableToPageTranslator {
operator fun invoke(module: DModule): RootPageNode
} \ No newline at end of file
diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt b/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt
index d0570c7a..a808a224 100644
--- a/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt
+++ b/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt
@@ -4,6 +4,6 @@ import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.plugability.DokkaContext
-interface DocumentableTransformer {
+fun interface DocumentableTransformer {
operator fun invoke(original: DModule, context: DokkaContext): DModule
}
diff --git a/core/src/main/kotlin/transformers/pages/PageTransformer.kt b/core/src/main/kotlin/transformers/pages/PageTransformer.kt
index 68dc4bc8..b51eb31b 100644
--- a/core/src/main/kotlin/transformers/pages/PageTransformer.kt
+++ b/core/src/main/kotlin/transformers/pages/PageTransformer.kt
@@ -2,6 +2,6 @@ package org.jetbrains.dokka.transformers.pages
import org.jetbrains.dokka.pages.RootPageNode
-interface PageTransformer {
+fun interface PageTransformer {
operator fun invoke(input: RootPageNode): RootPageNode
}
diff --git a/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt b/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt
index 291b72ef..6797eae6 100644
--- a/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt
+++ b/core/src/main/kotlin/transformers/pages/PageTransformerBuilders.kt
@@ -3,17 +3,11 @@ package org.jetbrains.dokka.transformers.pages
import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
-fun pageScanner(block: PageNode.() -> Unit) = object : PageTransformer {
- override fun invoke(input: RootPageNode): RootPageNode = input.invokeOnAll(block) as RootPageNode
-}
+fun pageScanner(block: PageNode.() -> Unit) = PageTransformer { input -> input.invokeOnAll(block) as RootPageNode }
-fun pageMapper(block: PageNode.() -> PageNode) = object : PageTransformer {
- override fun invoke(input: RootPageNode): RootPageNode = input.alterChildren(block) as RootPageNode
-}
+fun pageMapper(block: PageNode.() -> PageNode) = PageTransformer { input -> input.alterChildren(block) as RootPageNode }
-fun pageStructureTransformer(block: RootPageNode.() -> RootPageNode) = object : PageTransformer {
- override fun invoke(input: RootPageNode): RootPageNode = block(input)
-}
+fun pageStructureTransformer(block: RootPageNode.() -> RootPageNode) = PageTransformer { input -> block(input) }
fun PageNode.invokeOnAll(block: PageNode.() -> Unit): PageNode =
this.also(block).also { it.children.forEach { it.invokeOnAll(block) } }
diff --git a/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt b/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt
index 2252dde3..2f0ea031 100644
--- a/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt
+++ b/core/src/main/kotlin/transformers/sources/SourceToDocumentableTranslator.kt
@@ -4,6 +4,6 @@ import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.plugability.DokkaContext
-interface SourceToDocumentableTranslator {
+fun interface SourceToDocumentableTranslator {
fun invoke(sourceSet: DokkaSourceSet, context: DokkaContext): DModule
}
diff --git a/core/src/main/kotlin/validity/PreGenerationChecker.kt b/core/src/main/kotlin/validity/PreGenerationChecker.kt
index 7cdad59b..52e79046 100644
--- a/core/src/main/kotlin/validity/PreGenerationChecker.kt
+++ b/core/src/main/kotlin/validity/PreGenerationChecker.kt
@@ -1,6 +1,6 @@
package org.jetbrains.dokka.validity
-interface PreGenerationChecker : () -> PreGenerationCheckerOutput {
+fun interface PreGenerationChecker : () -> PreGenerationCheckerOutput {
override fun invoke(): PreGenerationCheckerOutput
}