To demonstrate the renaming of a generated class, we'll make use of the @JvmName annotation within our GreetingFunctions.kt file. Here, we've added the @JvmName annotation to our GreetingFunctions.kt file using the @file use-site target (we'll talk more about use-site targets later on in this chapter):
@file:JvmName("GreetingsHelper")// GreetingFunctions.ktfun sayHello(name: String) = println("Hello $name!")
Within the @JvmName annotation, we've specified the "GreetingsHelper" string as the name we'd like to use for the compiler-generated class. After this addition, calling the sayHello() function from Kotlin is unchanged:
// Main.ktfun main() { sayHello("Nate")}
But now, when calling ...