[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: handling multiple files
Gagan Agrawal wrote:
>
> Hello Soot Hackers,
> I just down-loaded Soot. I am interested in performing
> interprocedural analysis and I am wondering if
> there is some interface already built-up for input
> the byte-code from multiple files and storing
> the information which can then be used. I believe
> that this must have been done with things like Alias
> analysis etc. which are being worked on in the group.
Sure, if you have a class manager such as:
SootClassManager cm = new SootClassManager();
then simply doing something like
SootClass jls = cm.getClass("java.lang.String")
SootClass jlo = cm.getClass("java.lang.Object")
will load the classes for both java.lang.String and java.lang.Object
into memory. Then you can use the getMethod() method to retrieve
individual methods and then you can build representations. You should
look at examples that were included in the distribution, this should
give you an idea of how things are organized.
Best regards,
Raja