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/Analysis/AnalysisEnvironment.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/Analysis/AnalysisEnvironment.kt')
-rw-r--r-- | core/src/main/kotlin/Analysis/AnalysisEnvironment.kt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt index a5e35a0e..b0c39ee5 100644 --- a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt +++ b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt @@ -57,7 +57,7 @@ import java.io.File * $messageCollector: required by compiler infrastructure and will receive all compiler messages * $body: optional and can be used to configure environment without creating local variable */ -public class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable { +class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable { val configuration = CompilerConfiguration(); init { @@ -119,14 +119,14 @@ public class AnalysisEnvironment(val messageCollector: MessageCollector) : Dispo /** * Classpath for this environment. */ - public val classpath: List<File> + val classpath: List<File> get() = configuration.jvmClasspathRoots /** * Adds list of paths to classpath. * $paths: collection of files to add */ - public fun addClasspath(paths: List<File>) { + fun addClasspath(paths: List<File>) { configuration.addJvmClasspathRoots(paths) } @@ -134,14 +134,14 @@ public class AnalysisEnvironment(val messageCollector: MessageCollector) : Dispo * Adds path to classpath. * $path: path to add */ - public fun addClasspath(path: File) { + fun addClasspath(path: File) { configuration.addJvmClasspathRoot(path) } /** * List of source roots for this environment. */ - public val sources: List<String> + val sources: List<String> get() = configuration.get(CommonConfigurationKeys.CONTENT_ROOTS) ?.filterIsInstance<KotlinSourceRoot>() ?.map { it.path } ?: emptyList() @@ -150,25 +150,25 @@ public class AnalysisEnvironment(val messageCollector: MessageCollector) : Dispo * Adds list of paths to source roots. * $list: collection of files to add */ - public fun addSources(list: List<String>) { + fun addSources(list: List<String>) { list.forEach { configuration.add(CommonConfigurationKeys.CONTENT_ROOTS, contentRootFromPath(it)) } } - public fun addRoots(list: List<ContentRoot>) { + fun addRoots(list: List<ContentRoot>) { configuration.addAll(CommonConfigurationKeys.CONTENT_ROOTS, list) } /** * Disposes the environment and frees all associated resources. */ - public override fun dispose() { + override fun dispose() { Disposer.dispose(this) } } -public fun contentRootFromPath(path: String): ContentRoot { +fun contentRootFromPath(path: String): ContentRoot { val file = File(path) return if (file.extension == "java") JavaSourceRoot(file, null) else KotlinSourceRoot(path) } |