Ответ 1
Welcome to Scala version 2.10.0-20120617-072418-9a28ee1ffc (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
Type in expressions to have them evaluated.
Type :help for more information.
scala> class Foo { def bar(x: Int) = x }
defined class Foo
scala> val foo = new Foo
foo @ 5935b50c: Foo = [email protected]
scala> runtimeMirror(getClass.getClassLoader).reflect(foo)
res0 @ 65c24701: reflect.runtime.universe.InstanceMirror = [email protected]65c24701
scala> res0.symbol.typeSignature.member(newTermName("bar"))
res1 @ 69624a1c: reflect.runtime.universe.Symbol = method bar
scala> res0.reflectMethod(res1.asMethodSymbol)(42)
res2 @ 4ac1d188: Any = 42
Некоторая справочная информация о том, как разрабатывается API, можно найти здесь: Получить экземпляр объекта-компаньона с новым API-интерфейсом Scala.