Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a tutorial on Scala 2.10's reflection API yet? [closed]

Tags:

Is there a good place to get a thorough tutorial of Scala 2.10's reflection API? I see lots of blog posts written over the course of the last two years, but many of the details of these posts are already out of date.

Now that 2.10 is publicly available, is there any document that will walk me through how reflection works?

like image 693
Bill Avatar asked Jan 14 '13 16:01

Bill


People also ask

How to use reflection in Scala?

Types obtained through reflection can be instantiated by invoking their constructor using an appropriate “invoker” mirror (mirrors are expanded upon below). Let's walk through an example using the REPL: scala> case class Person(name: String) defined class Person scala> val m = ru. runtimeMirror(getClass.

What is Java Reflection API and why it's so important?

Reflection is a feature in the Java programming language. It allows an executing Java program to examine or "introspect" upon itself, and manipulate internal properties of the program. For example, it's possible for a Java class to obtain the names of all its members and display them.


1 Answers

Check out the official reflection guide at http://docs.scala-lang.org/overviews/reflection/overview.html. Thanks a lot to Heather Miller who took time to assemble it!

Other sources available are: 1) the slides from one of my talks, 2) Daniel Sobral's blog posts, 3) Scaladoc links on the stub pages accessible via the URL provided above, 4) and Stack Overflow answers. I might've missed something here, please let me know if that's the case.

like image 172
Eugene Burmako Avatar answered Sep 29 '22 17:09

Eugene Burmako