[Soot-list] How to get the types used in a given statement

Liu Yuan liuyuan at fastmail.com
Thu Mar 11 09:22:57 EST 2021


Hi, I’m trying to get the customized types (i.e., classes, interfaces, and enums) in a statement.
For example, line 3 is expected return types that are referenced or used: C1 and C2.  

1. C1 c1 = new C1();
2. C2 c2 = new C2();
3. int i = c1.m(c2); 

Because I concern the appearance order of types. So I first construct the CFG for a given method; then I get the start line number and start column number for each unit.

If the two numbers can represent the real numbers in source code files, I can parse the statements represented by the unit using JavaParser.

Is there a better way? thank you.


More information about the Soot-list mailing list