Reputation: 3
I can get the superclass of a class by SootClass.getSuperclass()
, but I don't know how to get its subclass.
Have I need to load the subclass first? There is no getSubclass()
function. Thanks!
Upvotes: 0
Views: 840
Reputation: 1393
You need to use Scene.v().getHierarchy() or Scene.v().getFastHierarchy()
Upvotes: 4
Reputation: 36
You cannot simply get "the subclass", because there can be many such classes, subclassing one specific class or implementing a certain interface.
I suppose, you would have to iterate over all classes in the scene and for each such class check if its superclass is the given class/interface.
Upvotes: 1