[Soot-list] Soot and Java Annotations

Florian Strauß f_straus at cs.uni-kl.de
Tue Jan 31 11:52:38 EST 2012


Hi all,

 

thanks for working on soot. It’s a very helpful framework. 

I am wondering if it is possible to get the Java Annotations, which are used
in the analyzed (source) code.

 

For example

Input:

public class Test1 {

      

      @MyAnnotation

      public void go() {

            

            @TestAnnotation

            Container c1 = new Container();

[..]

      }

}  

 

 

Output:

SootMethod test1Go = 
.

test1Go.getJavaAnnotation(“MyAnnotation”) ?

Local c1 = 


c1.getJavaAnnotation(“TestAnnotation”) ?

 

I know soot provides a type “Tag” and each subtype of “Host” has a method
“getTag”. Is it possible to use this method to get information about the
Java Annotations? Unfortunately Local (or JimpleLocal) does not implement
“Host”. Any ideas?

 

Best regards,

Florian

 

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120131/b68eda44/attachment.html 


More information about the Soot-list mailing list