aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Formats
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-04 19:39:39 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-04 19:39:39 +0100
commit3b3c2841674d9b7044494d16d4396662d273f1f9 (patch)
tree268f6d3085b05da702d5d61eff505000cd9ea36a /core/src/main/kotlin/Formats
parent0260b37dd051fc5d728820fa20b0ad7d94c33c0f (diff)
downloaddokka-3b3c2841674d9b7044494d16d4396662d273f1f9.tar.gz
dokka-3b3c2841674d9b7044494d16d4396662d273f1f9.tar.bz2
dokka-3b3c2841674d9b7044494d16d4396662d273f1f9.zip
cleanup: remove redundant 'public' modifiers
Diffstat (limited to 'core/src/main/kotlin/Formats')
-rw-r--r--core/src/main/kotlin/Formats/FormatDescriptor.kt2
-rw-r--r--core/src/main/kotlin/Formats/FormatService.kt2
-rw-r--r--core/src/main/kotlin/Formats/HtmlFormatService.kt8
-rw-r--r--core/src/main/kotlin/Formats/HtmlTemplateService.kt4
-rw-r--r--core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt8
-rw-r--r--core/src/main/kotlin/Formats/MarkdownFormatService.kt22
-rw-r--r--core/src/main/kotlin/Formats/OutlineService.kt8
7 files changed, 27 insertions, 27 deletions
diff --git a/core/src/main/kotlin/Formats/FormatDescriptor.kt b/core/src/main/kotlin/Formats/FormatDescriptor.kt
index 0c7ca794..e384f223 100644
--- a/core/src/main/kotlin/Formats/FormatDescriptor.kt
+++ b/core/src/main/kotlin/Formats/FormatDescriptor.kt
@@ -3,7 +3,7 @@ package org.jetbrains.dokka.Formats
import org.jetbrains.dokka.*
import kotlin.reflect.KClass
-public interface FormatDescriptor {
+interface FormatDescriptor {
val formatServiceClass: KClass<out FormatService>?
val outlineServiceClass: KClass<out OutlineFormatService>?
val generatorServiceClass: KClass<out Generator>
diff --git a/core/src/main/kotlin/Formats/FormatService.kt b/core/src/main/kotlin/Formats/FormatService.kt
index 73e54956..aa4e925c 100644
--- a/core/src/main/kotlin/Formats/FormatService.kt
+++ b/core/src/main/kotlin/Formats/FormatService.kt
@@ -7,7 +7,7 @@ package org.jetbrains.dokka
* * [HtmlFormatService] – outputs documentation to HTML format
* * [MarkdownFormatService] – outputs documentation in Markdown format
*/
-public interface FormatService {
+interface FormatService {
/** Returns extension for output files */
val extension: String
diff --git a/core/src/main/kotlin/Formats/HtmlFormatService.kt b/core/src/main/kotlin/Formats/HtmlFormatService.kt
index d513e41f..f78439ba 100644
--- a/core/src/main/kotlin/Formats/HtmlFormatService.kt
+++ b/core/src/main/kotlin/Formats/HtmlFormatService.kt
@@ -6,11 +6,11 @@ import java.io.File
import java.nio.file.Path
import java.nio.file.Paths
-public open class HtmlFormatService @Inject constructor(@Named("folders") locationService: LocationService,
- signatureGenerator: LanguageService,
- val templateService: HtmlTemplateService)
+open class HtmlFormatService @Inject constructor(@Named("folders") locationService: LocationService,
+ signatureGenerator: LanguageService,
+ val templateService: HtmlTemplateService)
: StructuredFormatService(locationService, signatureGenerator, "html"), OutlineFormatService {
- override public fun formatText(text: String): String {
+ override fun formatText(text: String): String {
return text.htmlEscape()
}
diff --git a/core/src/main/kotlin/Formats/HtmlTemplateService.kt b/core/src/main/kotlin/Formats/HtmlTemplateService.kt
index ae42a31b..13587b05 100644
--- a/core/src/main/kotlin/Formats/HtmlTemplateService.kt
+++ b/core/src/main/kotlin/Formats/HtmlTemplateService.kt
@@ -2,12 +2,12 @@ package org.jetbrains.dokka
import java.nio.file.Path
-public interface HtmlTemplateService {
+interface HtmlTemplateService {
fun appendHeader(to: StringBuilder, title: String?, basePath: Path)
fun appendFooter(to: StringBuilder)
companion object {
- public fun default(css: String? = null): HtmlTemplateService {
+ fun default(css: String? = null): HtmlTemplateService {
return object : HtmlTemplateService {
override fun appendFooter(to: StringBuilder) {
to.appendln("</BODY>")
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt
index 870347ab..f869bc75 100644
--- a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt
+++ b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt
@@ -2,7 +2,7 @@ package org.jetbrains.dokka
import com.google.inject.Inject
-public class KotlinWebsiteFormatService @Inject constructor(locationService: LocationService,
+class KotlinWebsiteFormatService @Inject constructor(locationService: LocationService,
signatureGenerator: LanguageService)
: JekyllFormatService(locationService, signatureGenerator, "html") {
private var needHardLineBreaks = false
@@ -13,7 +13,7 @@ public class KotlinWebsiteFormatService @Inject constructor(locationService: Loc
to.appendln("layout: api")
}
- override public fun formatBreadcrumbs(items: Iterable<FormatLink>): String {
+ override fun formatBreadcrumbs(items: Iterable<FormatLink>): String {
items.drop(1)
if (items.count() > 1) {
@@ -25,7 +25,7 @@ public class KotlinWebsiteFormatService @Inject constructor(locationService: Loc
return ""
}
- override public fun formatCode(code: String): String = if (code.length > 0) "<code>$code</code>" else ""
+ override fun formatCode(code: String): String = if (code.length > 0) "<code>$code</code>" else ""
override fun formatStrikethrough(text: String): String = "<s>$text</s>"
@@ -106,7 +106,7 @@ public class KotlinWebsiteFormatService @Inject constructor(locationService: Loc
to.appendln("\n</td>")
}
- override public fun appendBlockCode(to: StringBuilder, line: String, language: String) {
+ override fun appendBlockCode(to: StringBuilder, line: String, language: String) {
if (language.isNotEmpty()) {
super.appendBlockCode(to, line, language)
} else {
diff --git a/core/src/main/kotlin/Formats/MarkdownFormatService.kt b/core/src/main/kotlin/Formats/MarkdownFormatService.kt
index 07202b7e..4e16b1a8 100644
--- a/core/src/main/kotlin/Formats/MarkdownFormatService.kt
+++ b/core/src/main/kotlin/Formats/MarkdownFormatService.kt
@@ -3,16 +3,16 @@ package org.jetbrains.dokka
import com.google.inject.Inject
-public open class MarkdownFormatService
+open class MarkdownFormatService
@Inject constructor(locationService: LocationService,
signatureGenerator: LanguageService,
linkExtension: String = "md")
: StructuredFormatService(locationService, signatureGenerator, "md", linkExtension) {
- override public fun formatBreadcrumbs(items: Iterable<FormatLink>): String {
+ override fun formatBreadcrumbs(items: Iterable<FormatLink>): String {
return items.map { formatLink(it) }.joinToString(" / ")
}
- override public fun formatText(text: String): String {
+ override fun formatText(text: String): String {
return text.htmlEscape()
}
@@ -27,19 +27,19 @@ public open class MarkdownFormatService
return text.htmlEscape()
}
- override public fun formatCode(code: String): String {
+ override fun formatCode(code: String): String {
return "`$code`"
}
- override public fun formatUnorderedList(text: String): String = text + "\n"
- override public fun formatOrderedList(text: String): String = text + "\n"
+ override fun formatUnorderedList(text: String): String = text + "\n"
+ override fun formatOrderedList(text: String): String = text + "\n"
override fun formatListItem(text: String, kind: ListKind): String {
val itemText = if (text.endsWith("\n")) text else text + "\n"
return if (kind == ListKind.Unordered) "* $itemText" else "1. $itemText"
}
- override public fun formatStrong(text: String): String {
+ override fun formatStrong(text: String): String {
return "**$text**"
}
@@ -55,7 +55,7 @@ public open class MarkdownFormatService
return "[$text]($href)"
}
- override public fun appendLine(to: StringBuilder, text: String) {
+ override fun appendLine(to: StringBuilder, text: String) {
to.appendln(text)
}
@@ -63,19 +63,19 @@ public open class MarkdownFormatService
// no anchors in Markdown
}
- override public fun appendParagraph(to: StringBuilder, text: String) {
+ override fun appendParagraph(to: StringBuilder, text: String) {
to.appendln()
to.appendln(text)
to.appendln()
}
- override public fun appendHeader(to: StringBuilder, text: String, level: Int) {
+ override fun appendHeader(to: StringBuilder, text: String, level: Int) {
appendLine(to)
appendLine(to, "${"#".repeat(level)} $text")
appendLine(to)
}
- override public fun appendBlockCode(to: StringBuilder, line: String, language: String) {
+ override fun appendBlockCode(to: StringBuilder, line: String, language: String) {
appendLine(to)
to.appendln("``` ${language}")
to.appendln(line)
diff --git a/core/src/main/kotlin/Formats/OutlineService.kt b/core/src/main/kotlin/Formats/OutlineService.kt
index 6626cf51..3c31ba57 100644
--- a/core/src/main/kotlin/Formats/OutlineService.kt
+++ b/core/src/main/kotlin/Formats/OutlineService.kt
@@ -5,14 +5,14 @@ import java.io.File
/**
* Service for building the outline of the package contents.
*/
-public interface OutlineFormatService {
+interface OutlineFormatService {
fun getOutlineFileName(location: Location): File
- public fun appendOutlineHeader(location: Location, node: DocumentationNode, to: StringBuilder)
- public fun appendOutlineLevel(to: StringBuilder, body: () -> Unit)
+ fun appendOutlineHeader(location: Location, node: DocumentationNode, to: StringBuilder)
+ fun appendOutlineLevel(to: StringBuilder, body: () -> Unit)
/** Appends formatted outline to [StringBuilder](to) using specified [location] */
- public fun appendOutline(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) {
+ fun appendOutline(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) {
for (node in nodes) {
appendOutlineHeader(location, node, to)
if (node.members.any()) {