In Scala, I can declare an object like so:
class Thing
object Thingy extends Thing
How would I get "Thingy" (the name of the object) in Scala?
I’ve heard that Lift (the web framework for Scala) is capable of this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just get the class object and then its name.
All that’s left is to remove the
$.EDIT:
To remove names of enclosing objects and the tailing
$it is sufficient to do