[Soot-list] Determine a field's main class

Vasco Pessanha coreanu_ at hotmail.com
Thu Apr 28 09:14:31 EDT 2011


Perfect, it works as I wanted to:P

Thank you!
Vasco 

> Date: Wed, 27 Apr 2011 00:53:49 +0800
> Subject: Re: [Soot-list] Determine a field's main class
> From: cheng.zhang.stap at gmail.com
> To: coreanu_ at hotmail.com
> CC: soot-list at sable.mcgill.ca
> 
> Hi, Vasco,
> 
> Does JInstanceFieldRef.getField().getDeclaringClass() work in your case?
> 
> Best,
> 
> Cheng
> 
> On Wed, Apr 27, 2011 at 12:09 AM, Vasco Pessanha <coreanu_ at hotmail.com> wrote:
> > Hi,
> >
> > I am using Soot to collect all the class fields accessed in a program. For
> > each one, I keep the main class of the field and its name.
> > For instances, "<Pair, x>" refers to the field "x" of class "Pair".
> >
> > The problem is, if I have an abstract class "A" that has a field "f", and
> > another class "B" that extends "A", then I can have accesses to "f" in both
> > classes. Therefore, since I am deducing the main class with the class where
> > the access is made, we will generate "<A, f>" and "<B, f>" fields, despite
> > they are the same.
> >
> > Can anyone help me to determine which is the main class of a given field
> > (JInstanceFieldRef)? In the previous case would be "A"..
> >
> > Thanks,
> >
> > Vasco Pessanha
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
> >
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20110428/3bb8cacf/attachment.html 


More information about the Soot-list mailing list