diff options
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt index dec1591a..68ad1ecf 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinCompanion.kt @@ -46,20 +46,11 @@ internal fun DObject.companionInstancePropertyForJava(): DProperty? { ) } -internal fun DObject.companionAsJava(): DObject? { - if (hasNothingToRender()) return null - - return asJava( - excludedProps = staticPropertiesForJava(), - excludedFunctions = staticFunctionsForJava() - ) -} - /** * Hide companion object if there isn't members of parents. * Properties and functions that are moved to outer class are not counted as members. */ -private fun DObject.hasNothingToRender(): Boolean { +internal fun DObject.hasNothingToRender(): Boolean { val nonStaticPropsCount = properties.size - staticPropertiesForJava().size val nonStaticFunctionsCount = functions.size - staticFunctionsForJava().size val classLikesCount = classlikes.size |