Skip to content

Instantly share code, notes, and snippets.

@gkossakowski
Created January 23, 2013 05:34
Show Gist options
  • Save gkossakowski/4602343 to your computer and use it in GitHub Desktop.
Save gkossakowski/4602343 to your computer and use it in GitHub Desktop.
scala> rootMirror.getClassByName(newTermName("java.lang.reflect.Method"))
res5: $r.intp.global.ClassSymbol = class Method
scala> res5.info.member(newTermName("invoke"))
res7: $r.intp.global.Symbol = method invoke
scala> res7.annotations
res8: List[$r.intp.global.AnnotationInfo] = List(throws(classOf[java.lang.reflect.InvocationTargetException]), throws(classOf[java.lang.IllegalArgumentException]), throws(classOf[java.lang.IllegalAccessException]))
scala> res8.head
res9: $r.intp.global.AnnotationInfo = throws(classOf[java.lang.reflect.InvocationTargetException])
scala> res9.atp
res12: $r.intp.global.Type = throws
scala> res12.takesTypeArgs
res13: Boolean = true
scala> res12.typeParams
res15: List[$r.intp.global.Symbol] = List(type T)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment