[Soot-list] Detecting Synthetic Class Members

Eric Bodden eric.bodden at ec-spride.de
Fri Nov 9 01:57:29 EST 2012


Hello.

> I've been having some trouble examining classes in Soot that have
> Synthetic methods and fields. I realize that there are two ways to
> specify a member as synthetic in a class file, through the Synthetic
> attribute and through the access flag. [1] It appears that Soot/coffi
> only supports the attribute and not the access flag. The class file
> spec [2] shows how to set the access_flags to indicate a synthetic
> property.

That's interesting. Do you know why there are two different ways to
achieve the same thing?

> In order to even read this access_flags property, the coffi.ClassFile
> would need to define and support ACC_SYNTHETIC, probably here: [3].
> Would it make more sense to then add an additional constant to
> soot.Modifier [4], or simply detect when that flag was set and in turn
> set the Sythentic tag?

I would go for the latter unless there's a good reason do distinguish
both cases.

Eric


More information about the Soot-list mailing list