I have been experimenting with Manifests and such in Scala, and I am having a very hard finding a way to use an object\'s fields when accessed via the getDeclaredFields meth
class Woah(val x: String, val y: String) {
def printParams = classOf[Woah].getDeclaredFields foreach { field =>
field.setAccessible(true)
println(field.get(this))
}
}
All JVM fields in Scala are private. Access to them is made only through getters, in Scala, so that there's no distinction between them and a parameterless method.