[Soot-list] Call-Graph target edge - Determining target class

John Dee jdsoot at hotmail.com
Wed Jul 20 17:53:05 EDT 2011


Hi all. 
I have a question regarding call graphs. I'm looking to build a call graph for a method in my java source code.Supposing I have 2 simple classes like so.

package com;
import com.foo.Bar;
public class Foo {   public void doJaa() {      StringBuilder s = new StringBuilder("Silly");      s.append(" String");      Bar b = new Bar();      b.print(s.toString());   }}

package com.foo;
public class Bar {
   public void print(String s) {      System.out.println(s);   }}
Imagine I want to build a call graph starting with method 'doJaa' in class Foo. I can get an edge iterator using the method'edgesOutOf(dooJa);'. My question is this - Is it possible to tell Soot to ignore target methods that are part of Binary classes?So, in the above example, I'm not interested in including the StringBuilder 's.append(" String");' method, nor the StringBuilder 'new StringBuilder("Silly");'constructor in the call graph, as these are to binary class files included on the java class path. Instead, I want to include the 'b.print()' method and 'new Bar()' constructor in the call graph. In other words, I'm only interested in examining source code methods in the call graph. Is this possible?
Many Thanks JD 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20110720/8e3358ca/attachment.html 


More information about the Soot-list mailing list