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/Locations/LocationService.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/Locations/LocationService.kt')
-rw-r--r-- | core/src/main/kotlin/Locations/LocationService.kt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/main/kotlin/Locations/LocationService.kt b/core/src/main/kotlin/Locations/LocationService.kt index 80bc0236..63c236ed 100644 --- a/core/src/main/kotlin/Locations/LocationService.kt +++ b/core/src/main/kotlin/Locations/LocationService.kt @@ -2,7 +2,7 @@ package org.jetbrains.dokka import java.io.File -public interface Location { +interface Location { val path: String get fun relativePathTo(other: Location, anchor: String? = null): String } @@ -15,7 +15,7 @@ public interface Location { * $file: [File] for this location * $path: [String] representing path of this location */ -public data class FileLocation(val file: File): Location { +data class FileLocation(val file: File): Location { override val path : String get() = file.path @@ -41,7 +41,7 @@ public data class FileLocation(val file: File): Location { * * [SingleFolderLocationService] – all documentation is generated into single folder using fully qualified names * for file names. */ -public interface LocationService { +interface LocationService { fun withExtension(newExtension: String) = this fun location(node: DocumentationNode): Location = location(node.path.map { it.name }, node.members.any()) @@ -56,7 +56,7 @@ public interface LocationService { } -public interface FileLocationService: LocationService { +interface FileLocationService: LocationService { override fun withExtension(newExtension: String): FileLocationService = this override fun location(node: DocumentationNode): FileLocation = location(node.path.map { it.name }, node.members.any()) @@ -64,7 +64,7 @@ public interface FileLocationService: LocationService { } -public fun identifierToFilename(path: String): String { +fun identifierToFilename(path: String): String { val escaped = path.replace('<', '-').replace('>', '-') val lowercase = escaped.replace("[A-Z]".toRegex()) { matchResult -> "-" + matchResult.value.toLowerCase() } return if (lowercase == "index") "--index--" else lowercase |