Dilraj Singh
12/11/2021, 11:57 AMMyCustomAnnotation
and a class of the following manner:
@MyCustomAnnotation
abstract class User {
val id: Int = 11
val name: String
}
Now I am trying to generate the following function using KSP:
fun getUser(id: Int = 11, name: String): User {
return User(id, name)
}
I am unable to get the value defined of the variable id
, so the function generated has no default arguments. Any method to get the value of a class variable? Currently the following function is being generated:
fun getUser(id: Int name: String): User {
return User(id, name)
}
ThanksChris Mulder
12/11/2021, 2:46 PMDilraj Singh
12/11/2021, 7:07 PMAlexandru Hadăr
12/11/2021, 7:47 PMDilraj Singh
12/11/2021, 8:13 PM