I want to create a abstract class which defines a list of the type of it's child class.
I have an abstract class A which has a list of the class extending it.
I have a class B which extends class A and therefore has a list of type B.
It's important that the list can only hold the type of it's own class. I want to define it in the abstract base class because I don't want to define it in every single subclass.
How can I achieve this best? Is this possible with generics?