I’m trying to create a spring wrapper for a class ...
# spring
r
I’m trying to create a spring wrapper for a class that takes a constructor. I was trying to do it with delegation, but I’m stomped because the core class takes a dependency via its constructor. E.g:
Copy code
interface A {
        fun methodA()
        fun methodB()
}

class MyClassA(var dependency: MyDependency): A {
        override fun methodA() { dependency.doSomething() }
        override fun methodB() { dependency.doSomething() }
}