[Soot-list] Load jar into soot
Stefan Willenbrock
willenbr at rhrk.uni-kl.de
Fri May 7 15:13:31 EDT 2010
Eric Bodden schrieb:
> Hi Stefan. Are you sure that this works? That would even be news to me :-)
>
Hi Eric,
Yes, i'm sure. And it works because i use it here successfully in some
ant files.
You can look into class soot.SourceLocator which contains the code for
handling jar files:
public List<String> getClassesUnder(String aPath) {
List<String> fileNames = new ArrayList<String>();
if (isJar(aPath)) {
List inputExtensions = new ArrayList(2);
inputExtensions.add(".class");
inputExtensions.add(".jimple");
inputExtensions.add(".java");
try {
ZipFile archive = new ZipFile(aPath);
...
Multiple "-process-dir" options are possible because soot.Options can
parse them multiple times and stores them inside a list.
Kind regards,
Stefan
More information about the Soot-list
mailing list