Passing the current class as an argument to scala

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

mymethod (this.class)  

or

mymethod (MyClass.class)

How to pass the current scala class to this method?

+3
source share
1 answer

this.getClass or classOf[MyClass]

+12
source

Source: https://habr.com/ru/post/1789499/


All Articles