[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another newbie question :-)



On Thu, 28 Feb 2002, Feng QIAN wrote:

>Hi Andreas,
>
>http://www.sable.mcgill.ca/soot/tutorial/createclass/
>
>has an introduction to create a method body (jimple) and add local
>variables.

Yes, I used that earlier, but I wanted to create global variables, which
I know I can do via addField in SootClass.  I also wanted to be able to
discover the fields that exist inone class (to be able to make similar
fields in another class), but when I call getFields() I get an empty
chain, even though I know (getFieldCount returns 1) that there exists a
field in the class...

After rgepping through various source code that uses Soot (including the
tutorials) I cannot find anywhere getFields() is used..

aw s$%t, I was calling getFields on the wrong class, bŁ$%^er.

Sorry for the trouble everyone :-(

Andreas


>
>Cheers,
>===========================================================
>Feng Qian                             fqian@sable.mcgill.ca
>
>On Thu, 28 Feb 2002, Andreas Martens wrote:
>
>> Hi again,
>>
>> I am slowly getting to grips with Soot, and I am managing to create
>> classes with constructors, methods, etc...  But now I was wanting to
>> both read and create variables in classes, but I don't seem to be able
>> to see how and where they are stored...
>>
>> Help is, as always, appreciated.
>>
>> Andreas
>>
>> --
>> Andreas Martens, DoC, Imperial College
>> Help fight continental drift
>>
>
>

-- 
Andreas Martens, DoC, Imperial College
Help fight continental drift