is there any way to get a private property by name...
# announcements
is there any way to get a private property by name? I'm getting this error with this code
kotlin.reflect.IllegalCallableAccessException: Class kotlin.reflect.jvm.internal.FunctionCaller$FieldGetter can not access a member of class$Loan$Builder with modifiers "private"
Copy code
class Builder {
    private var currentInterestRate: BigDecimal? = null

    fun currentInterestRate(currentInterestRate : BigDecimal): Builder {
        val built = getFunctionFromFile("currentInterestRate", currentInterestRate)
        return built
    // Goal is for this to take in object, pull out object name, find property with same name
    // and set that property to the value of the object passed in
    fun getFunctionFromObjectName(funcName: String, ob: Any): Builder { //KFunction<*>? {
        Builder::class.members.find { e -> == funcName }?.call(ob)
        return this