Provide toString method for ScriptCompilationConfigurationWrapper
This is needed for debug and logging proposes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,10 @@ open class ScriptCompilationConfiguration(baseConfigurations: Iterable<ScriptCom
|
||||
return if (newConfiguration == this) this
|
||||
else newConfiguration
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "ScriptCompilationConfiguration($providedProperties)"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
@@ -48,6 +48,10 @@ abstract class ScriptDefinition : UserDataHolderBase() {
|
||||
inline fun <reified T : KotlinScriptDefinition> asLegacyOrNull(): T? =
|
||||
if (this is FromLegacy) legacyDefinition as? T else null
|
||||
|
||||
override fun toString(): String {
|
||||
return "ScriptDefinition($name)"
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
open class FromLegacy(
|
||||
override val hostConfiguration: ScriptingHostConfiguration,
|
||||
|
||||
+8
@@ -152,6 +152,10 @@ abstract class ScriptCompilationConfigurationWrapper(val script: SourceCode) {
|
||||
super.equals(other) && other is FromCompilationConfiguration && configuration == other.configuration
|
||||
|
||||
override fun hashCode(): Int = super.hashCode() + 23 * (configuration?.hashCode() ?: 1)
|
||||
|
||||
override fun toString(): String {
|
||||
return "FromCompilationConfiguration($configuration)"
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@@ -200,6 +204,10 @@ abstract class ScriptCompilationConfigurationWrapper(val script: SourceCode) {
|
||||
super.equals(other) && other is FromLegacy && legacyDependencies == other.legacyDependencies
|
||||
|
||||
override fun hashCode(): Int = super.hashCode() + 31 * (legacyDependencies?.hashCode() ?: 1)
|
||||
|
||||
override fun toString(): String {
|
||||
return "FromLegacy($legacyDependencies)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user