[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SootField referencing in a method body
Hi,
I am using a SceneTransformer to create a new Method (from an old one
through a clone() ) and a new global Field (at the moment it's just a
double). Then I am modifying the new/cloned Method with a
BodyTransformer and I try to save a result, another double, in that
global Field I defined in the SceneTransformer. The problem is, I cannot
seem to get a Value from a SootField no matter what. And for a
newAssignStmt I need one. I also tried with newInstanceFieldRef but how
can I get a statement out of that? What I want is to have a global Field
= method local. I guess that you got it by now that I have a problem
with the call-by-value that Java uses :) and that I need to return to a
method more than the original return value, and I would like to avoid
using an Array(new return Type) with the old return value plus the new
stuff that I create through the transformations that I am doing in the
BodyTransformer. I hope I have been clear enough and if anybody has an
ideea of how can I achieve what I want, I would be very grateful. And if
you have a better idea of doing what I described, that would be even
better...
Cheers,
Emil
PS. And by the way, Soot is a really good piece of work ;-)