4

How to pass current class as argument? In java we do:

mymethod (this.class)  

or

mymethod (MyClass.class)

How can I pass a scala current class to this method?

mac
  • 42,153
  • 26
  • 121
  • 131
Rajmahendra
  • 3,092
  • 3
  • 31
  • 42
  • 3
    Similar question: http://stackoverflow.com/questions/1135248/scala-equivalent-of-java-java-lang-classt-object – tenshi Feb 02 '11 at 13:48

1 Answers1

13

this.getClass or classOf[MyClass]

Knut Arne Vedaa
  • 15,372
  • 11
  • 48
  • 59