[Soot-list] Main entry points

Mario Mendez mario at cs.unm.edu
Tue Apr 24 22:48:23 EDT 2007


Thank you again for the quick responses to previous emails. The 
Hierarchy class has saved quite a lot of time of my life!

Another question: is there any method to retrieve all the application 
classes that contain a 'main' method? I mean, my analysis will have 2 
modes: 'library', in which all public methods can be considered as entry 
points, and 'main', in which only the mains of the application classes 
can be considered as entry points.

I found Scene.getMainClass, but it returns a SootClass (instead of a 
List) and since there is no Javadoc about it, it's not clear to me which 
criteria does the method use to choose that main class. For example, if 
we run

soot -f n -output-dir ./ilciao_lib/ -app examples.Qsort 
jolden.voronoi.Voronoi

, then the main class returned by Scene.getMainClass is examples.Qsort

If we invert the order of the parameters

soot -f n -output-dir ./ilciao_lib/ -app jolden.voronoi.Voronoi 
examples.Qsort

, then the main class returned by Scene.getMainClass is 
jolden.voronoi.Voronoi

Is there an API method to get both classes (AND ANY OTHER APPLICATION 
CLASS CONTAINING A MAIN) or should I just iterate over the public 
methods looking for those whose definition match with the one of main?


Thanks!


More information about the Soot-list mailing list