Under Android environment, I need to list all subclasses of one of my classes.
I saw that there is samples with reading the directories…. But I would like to find them by asking to the Thread or application level or another running object.
Under iOS I use objc_getClassList and then I select the ones that I am interested in.
Dose someone know if there is a way to find a clean solution like objc_getClassList on generic java or specific android libraries?
Thanks in advance.
PS: All these classes I want to list are in a certain java package
I am not really sure did I understand your question, but you could make a class called AllClasses or something, and in it put an ArrayList subclasses; and then in every subclass you have do
AllClasses.subclasses.add(this).
Thanks should do it