All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tracer.util.NameFunctions.kt Maven / Gradle / Ivy

There is a newer version: 1.8.0-1.0.2
Show newest version
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