vendredi 23 septembre 2016

Scala class constructor's default argument naming

I need to instantiate Scala class using reflection.

I want to use class default constructor which has arguments with default values, so I need to get these default values.

Default values in Scala are just methods in JVM, so I need to get all class methods and call only those are returns default values.

The question: I see that there are two different naming conventions for methods which returns default arg values - "apply$default$X" and "$lessinit$greater$default$X" (where X is a number of position of particular argument). What is the difference between these two? Maybe it depends on Scala version or something else?





Aucun commentaire:

Enregistrer un commentaire