How to get Java's int.class in Scala?
java, reflection, scala
Solution
int.class, float.class, etc. do not exist. The equivalent boxed types each have a static field called `TYPE` which represents the primitive type. Is this what you mean?
e.g. for int/Integer:
http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#TYPE
If so, you reference it from Scala just like you would in Java:
scala> Integer.TYPE
res0: java.lang.Class[java.lang.Integer] = int
Problem
I am using Scala to do some work with Java's reflection API. But I can't seem to figure out how to access in Scala what in Java would be: int.class, float.class, boolean.class. Basically the classes objects that represent the primitive data types. So what is the Scala version of int.class?