From cd9463ae8d96a05c7b779c06993fd2a207e599aa Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 20 Jan 2021 11:22:31 +0100 Subject: [PATCH] Minor, add toString for GeneratedFile --- .../src/org/jetbrains/kotlin/build/generatedFiles.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build-common/src/org/jetbrains/kotlin/build/generatedFiles.kt b/build-common/src/org/jetbrains/kotlin/build/generatedFiles.kt index 4c309bd4d92..e158e049d50 100644 --- a/build-common/src/org/jetbrains/kotlin/build/generatedFiles.kt +++ b/build-common/src/org/jetbrains/kotlin/build/generatedFiles.kt @@ -26,11 +26,13 @@ open class GeneratedFile( val outputFile: File ) { val sourceFiles = sourceFiles.sortedBy { it.path } + + override fun toString(): String = "${this::class.java.simpleName}: $outputFile" } -class GeneratedJvmClass ( - sourceFiles: Collection, - outputFile: File +class GeneratedJvmClass( + sourceFiles: Collection, + outputFile: File ) : GeneratedFile(sourceFiles, outputFile) { val outputClass = LocalFileKotlinClass.create(outputFile).sure { "Couldn't load KotlinClass from $outputFile; it may happen because class doesn't have valid Kotlin annotations"