blob: da5f8df63e07d305b0b964e874f6a4e1a30c7ed9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
object Test {
def f1(clazz: Class[_]) = clazz.getDeclaredFields.toList map (f => (f.getName, f.getGenericType)) foreach println
def f2(clazz: Class[_]) = clazz.getDeclaredMethods.toList map (f => (f.getName, f.getGenericReturnType)) foreach println
def main(args: Array[String]): Unit = {
f1(classOf[One])
f2(classOf[One])
f1(classOf[Two])
f2(classOf[Two])
new J_2().javaRun
}
}
|