If I have a small Scala class with a private field and public accessors:
class Entity {
private var _name:String = ""
def name:String = <some stuff>
def name_=(v:String) = <some stuff>
}
How can I invoke these accessors using Java reflection?
The class may be 3rd party code, or at least really hard to change. Please note that making the underlying field accessible will not allow us to call the code in the accessors, which is what I'm really after.