How can I pass the name of a class to its super class constructor and is it even possible? I'm thinking about something like this:
class TestClass extends SuperTestRequiringName(TestClass.getClass.getName) {}
Apparently this doesn't work.
I'm not asking how to access the subclass name inside the super class at runtime in general. It is important that the class name is available as a constructor argument so the super class can pass it along to its own super class (from a library I can't change).
Aucun commentaire:
Enregistrer un commentaire