[Soot-list] How can I change method's parameters types
Eric Bodden
eric.bodden at mail.mcgill.ca
Sat Feb 7 10:00:44 EST 2009
Hi Amir.
To me that seems like a threading problem, not a problem with Soot.
Are you running your Soot within the AWT event-dispatch thread? If so,
you may need to change that.
Eric
2009/2/7 Amir Mehrabi <mehrabi at comp.iust.ac.ir>:
> 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
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
--
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada
More information about the Soot-list
mailing list