diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2016-01-04 19:39:39 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2016-01-04 19:39:39 +0100 |
commit | 3b3c2841674d9b7044494d16d4396662d273f1f9 (patch) | |
tree | 268f6d3085b05da702d5d61eff505000cd9ea36a /core/src/main/kotlin/Model/DocumentationNode.kt | |
parent | 0260b37dd051fc5d728820fa20b0ad7d94c33c0f (diff) | |
download | dokka-3b3c2841674d9b7044494d16d4396662d273f1f9.tar.gz dokka-3b3c2841674d9b7044494d16d4396662d273f1f9.tar.bz2 dokka-3b3c2841674d9b7044494d16d4396662d273f1f9.zip |
cleanup: remove redundant 'public' modifiers
Diffstat (limited to 'core/src/main/kotlin/Model/DocumentationNode.kt')
-rw-r--r-- | core/src/main/kotlin/Model/DocumentationNode.kt | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt index 52881f65..35933aee 100644 --- a/core/src/main/kotlin/Model/DocumentationNode.kt +++ b/core/src/main/kotlin/Model/DocumentationNode.kt @@ -2,73 +2,73 @@ package org.jetbrains.dokka import java.util.* -public open class DocumentationNode(val name: String, - content: Content, - val kind: DocumentationNode.Kind) { +open class DocumentationNode(val name: String, + content: Content, + val kind: DocumentationNode.Kind) { private val references = LinkedHashSet<DocumentationReference>() var content: Content = content private set - public val summary: ContentNode get() = content.summary + val summary: ContentNode get() = content.summary - public val owner: DocumentationNode? + val owner: DocumentationNode? get() = references(DocumentationReference.Kind.Owner).singleOrNull()?.to - public val details: List<DocumentationNode> + val details: List<DocumentationNode> get() = references(DocumentationReference.Kind.Detail).map { it.to } - public val members: List<DocumentationNode> + val members: List<DocumentationNode> get() = references(DocumentationReference.Kind.Member).map { it.to } - public val inheritedMembers: List<DocumentationNode> + val inheritedMembers: List<DocumentationNode> get() = references(DocumentationReference.Kind.InheritedMember).map { it.to } - public val extensions: List<DocumentationNode> + val extensions: List<DocumentationNode> get() = references(DocumentationReference.Kind.Extension).map { it.to } - public val inheritors: List<DocumentationNode> + val inheritors: List<DocumentationNode> get() = references(DocumentationReference.Kind.Inheritor).map { it.to } - public val overrides: List<DocumentationNode> + val overrides: List<DocumentationNode> get() = references(DocumentationReference.Kind.Override).map { it.to } - public val links: List<DocumentationNode> + val links: List<DocumentationNode> get() = references(DocumentationReference.Kind.Link).map { it.to } - public val hiddenLinks: List<DocumentationNode> + val hiddenLinks: List<DocumentationNode> get() = references(DocumentationReference.Kind.HiddenLink).map { it.to } - public val annotations: List<DocumentationNode> + val annotations: List<DocumentationNode> get() = references(DocumentationReference.Kind.Annotation).map { it.to } - public val deprecation: DocumentationNode? + val deprecation: DocumentationNode? get() = references(DocumentationReference.Kind.Deprecation).singleOrNull()?.to // TODO: Should we allow node mutation? Model merge will copy by ref, so references are transparent, which could nice - public fun addReferenceTo(to: DocumentationNode, kind: DocumentationReference.Kind) { + fun addReferenceTo(to: DocumentationNode, kind: DocumentationReference.Kind) { references.add(DocumentationReference(this, to, kind)) } - public fun addAllReferencesFrom(other: DocumentationNode) { + fun addAllReferencesFrom(other: DocumentationNode) { references.addAll(other.references) } - public fun updateContent(body: MutableContent.() -> Unit) { + fun updateContent(body: MutableContent.() -> Unit) { if (content !is MutableContent) { content = MutableContent() } (content as MutableContent).body() } - public fun details(kind: DocumentationNode.Kind): List<DocumentationNode> = details.filter { it.kind == kind } - public fun members(kind: DocumentationNode.Kind): List<DocumentationNode> = members.filter { it.kind == kind } - public fun inheritedMembers(kind: DocumentationNode.Kind): List<DocumentationNode> = inheritedMembers.filter { it.kind == kind } - public fun links(kind: DocumentationNode.Kind): List<DocumentationNode> = links.filter { it.kind == kind } + fun details(kind: DocumentationNode.Kind): List<DocumentationNode> = details.filter { it.kind == kind } + fun members(kind: DocumentationNode.Kind): List<DocumentationNode> = members.filter { it.kind == kind } + fun inheritedMembers(kind: DocumentationNode.Kind): List<DocumentationNode> = inheritedMembers.filter { it.kind == kind } + fun links(kind: DocumentationNode.Kind): List<DocumentationNode> = links.filter { it.kind == kind } - public fun detail(kind: DocumentationNode.Kind): DocumentationNode = details.filter { it.kind == kind }.single() - public fun member(kind: DocumentationNode.Kind): DocumentationNode = members.filter { it.kind == kind }.single() - public fun link(kind: DocumentationNode.Kind): DocumentationNode = links.filter { it.kind == kind }.single() + fun detail(kind: DocumentationNode.Kind): DocumentationNode = details.filter { it.kind == kind }.single() + fun member(kind: DocumentationNode.Kind): DocumentationNode = members.filter { it.kind == kind }.single() + fun link(kind: DocumentationNode.Kind): DocumentationNode = links.filter { it.kind == kind }.single() - public fun references(kind: DocumentationReference.Kind): List<DocumentationReference> = references.filter { it.kind == kind } - public fun allReferences(): Set<DocumentationReference> = references + fun references(kind: DocumentationReference.Kind): List<DocumentationReference> = references.filter { it.kind == kind } + fun allReferences(): Set<DocumentationReference> = references - public override fun toString(): String { + override fun toString(): String { return "$kind:$name" } - public enum class Kind { + enum class Kind { Unknown, Package, @@ -121,7 +121,7 @@ public open class DocumentationNode(val name: String, } } -public class DocumentationModule(name: String, content: Content = Content.Empty) +class DocumentationModule(name: String, content: Content = Content.Empty) : DocumentationNode(name, content, DocumentationNode.Kind.Module) { } |