[Soot-list] How can I change method's parameters types

Amir Mehrabi mehrabi at comp.iust.ac.ir
Sat Feb 7 01:26:48 EST 2009


Hi all
I want to change type of my method's parameter
How can I do this?
for example 
I Have a method like :
            public void sample(int a,TestClass c);
 
I want to change the type of these method to
            public void sample(int a,long c);
 
when I want to do this in BodyTransformer , soot throws an exception , the 
following code are a portial of my code

...
protected void internalTransform(Body body,String phasename,Map option){

List lst=body.getMethod().getParameterTypes();
for(int i=0;i< lst.size() ; i++)
{
     lst.add(RefType.v("MyPackage.MyClass"));
}
body.getMethod.setParameterTypes(lst);          <==== throws an exception
...
}


     THROWS :
     Exception in thread "AWT-EventQueue-0" 
java.util.ConcurrentModificationException 


any body have an idea?!
 
 Thanks
 Amir Mehrabi Jorshary

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


More information about the Soot-list mailing list