aerb
02/05/2021, 11:19 PMthrowing
?) where the compiler auto-generates interface implementations that just throw
, but that you have an option to override.
This would basically be for creating fakes on massive interfaces without reflection proxying. Eg:
class FakeConnection : java.sql.Connection by throwing {
override fun prepareCall(sql: String) {
// ... some assertion.
}
}
I definitely see potential for abuse, but in a testing context super handy.jw
02/06/2021, 12:24 AM