scalaj-reflect
scalaj-reflect copied to clipboard
Can't get the class of inner classes
Suppose there is a class with an inner class:
class Out {
class In {
def foo(name:String) = ""
}
}
I have get the method of Out.In.foo
, and I want to get the parameter names of it:
for {
clazz <- Mirror.ofClass(method.getDeclaringClass).toSeq
method <- clazz.allDefs.find(_.name == method.getName).toSeq
param <- method.flatParams
} yield (param.name, param.symType.toString)
But seems can't find that inner class:
Mirror.ofClass(method.getDeclaringClass).toSeq
returns a List()
I won't work at the moment, this is on the backlog.