diff options
author | Szymon Świstun <sswistun@virtuslab.com> | 2020-01-20 14:55:42 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-02-12 13:13:18 +0100 |
commit | 50e711d24b517bc93c37d89f258c9dafaa038ad1 (patch) | |
tree | 201c27b6860ac14b6ddc673ff099d74f53b4e15c /core/src/main/kotlin/pages/PageContentBuilder.kt | |
parent | 5a432c9c62ff95779a495fb354c83f5f7c481a1d (diff) | |
download | dokka-50e711d24b517bc93c37d89f258c9dafaa038ad1.tar.gz dokka-50e711d24b517bc93c37d89f258c9dafaa038ad1.tar.bz2 dokka-50e711d24b517bc93c37d89f258c9dafaa038ad1.zip |
kotlin-as-java plugin
Diffstat (limited to 'core/src/main/kotlin/pages/PageContentBuilder.kt')
-rw-r--r-- | core/src/main/kotlin/pages/PageContentBuilder.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/kotlin/pages/PageContentBuilder.kt b/core/src/main/kotlin/pages/PageContentBuilder.kt index d5ffe27a..bc01b03e 100644 --- a/core/src/main/kotlin/pages/PageContentBuilder.kt +++ b/core/src/main/kotlin/pages/PageContentBuilder.kt @@ -8,21 +8,21 @@ import org.jetbrains.dokka.model.TypeWrapper import org.jetbrains.dokka.model.doc.DocTag import org.jetbrains.dokka.utilities.DokkaLogger -class DefaultPageContentBuilder( +open class DefaultPageContentBuilder( private val dri: Set<DRI>, private val platformData: Set<PlatformData>, private val kind: Kind, private val commentsConverter: CommentsToContentConverter, - val logger: DokkaLogger, + open val logger: DokkaLogger, private val styles: Set<Style> = emptySet(), private val extras: Set<Extra> = emptySet() ) : PageContentBuilder { private val contents = mutableListOf<ContentNode>() - private fun createText(text: String, kind: Kind = ContentKind.Symbol) = + protected fun createText(text: String, kind: Kind = ContentKind.Symbol) = ContentText(text, DCI(dri, kind), platformData, styles, extras) - private fun build() = ContentGroup( + protected fun build() = ContentGroup( contents.toList(), DCI(dri, kind), platformData, @@ -38,7 +38,7 @@ class DefaultPageContentBuilder( contents += createText(text, kind) } - private fun signature(f: Function, block: PageContentBuilderFunction) { + protected fun signature(f: Function, block: PageContentBuilderFunction) { contents += group(setOf(f.dri), f.platformData, ContentKind.Symbol, block) } @@ -163,7 +163,7 @@ class DefaultPageContentBuilder( } -private fun PageContentBuilder.type(t: TypeWrapper) { +fun PageContentBuilder.type(t: TypeWrapper) { if (t.constructorNamePathSegments.isNotEmpty() && t.dri != null) link(t.constructorNamePathSegments.last(), t.dri!!) else if (t.constructorNamePathSegments.isNotEmpty() && t.dri == null) |