tracer.util.NameFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ksp-util Show documentation
Show all versions of ksp-util Show documentation
"Remember to use with my sample which hasn't come out yet."
package tracer.util
import com.google.devtools.ksp.symbol.KSDeclaration
import com.google.devtools.ksp.symbol.KSFile
import kotlin.reflect.KClass
public fun KSDeclaration.simpleName(): String = simpleName.asString()
public fun KSDeclaration.packageName(): String = packageName.asString()
public fun KSFile.packageName(): String = packageName.asString()
public fun KSDeclaration.qualifiedName(): String? = qualifiedName?.asString()
public fun KSDeclaration.noPackageName(): String? =
qualifiedName()?.substringAfter(packageName.asString() + ".")
public fun KClass<*>.noPackageName(): String? =
qualifiedName?.substringAfter(java.`package`.name + ".")
© 2015 - 2025 Weber Informatics LLC | Privacy Policy