com.lemonappdev.konsist.core.util.ParentUtil.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of konsist Show documentation
Show all versions of konsist Show documentation
A Kotlin architecture test library. Define and guard code base consistency using Kotlin.
The newest version!
package com.lemonappdev.konsist.core.util
import com.lemonappdev.konsist.api.declaration.KoParentDeclaration
import com.lemonappdev.konsist.api.provider.KoFullyQualifiedNameProvider
import kotlin.reflect.KClass
object ParentUtil {
internal fun checkIfParentOf(
kClass: KClass<*>,
list: List,
): Boolean =
list.any { parent ->
(parent.sourceDeclaration as? KoFullyQualifiedNameProvider)?.fullyQualifiedName == kClass.qualifiedName
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy