Is there a simple method I can use to list all of the properties in a class that don't implement a custom getter?
For example:
class Person(val name: String, val age: Int) {
val signature: String get() = "$name - $age"
val uuid = UUID.randomUUID()
}
Using the code above, I would like to find the following:
Properties that only have a getter do not have a JVM backing field, therefore; you can take all the properties, and exclude the ones that do not have a field.
It should be noted that the
signature
is missing from the second set.