snowe
01/13/2017, 5:10 AMkotlin.reflect.IllegalCallableAccessException: Class kotlin.reflect.jvm.internal.FunctionCaller$FieldGetter can not access a member of class com.promontech.loanapp.projection.loan.viewmodel.loandetails.LoanDetailsView$Loan$Builder with modifiers "private"
class Builder {
private var currentInterestRate: BigDecimal? = null
fun currentInterestRate(currentInterestRate : BigDecimal): Builder {
val built = getFunctionFromFile("currentInterestRate", currentInterestRate)
println(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 -> e.name == funcName }?.call(ob)
return this
}
}