[Soot-list] constructors with field defaults?
Eric Bodden
eric.bodden at mail.mcgill.ca
Tue Apr 11 18:34:51 EDT 2006
Hi, Greg.
I don't think so, because those assignments in fact do not exist in the
bytecode. The VM rather assumes fields to have those values *implicitly*
unless anything else is assigned.
Eric
> -----Original Message-----
> From: soot-list-bounces at sable.mcgill.ca
> [mailto:soot-list-bounces at sable.mcgill.ca] On Behalf Of Greg Dennis
> Sent: Tuesday, April 11, 2006 1:14 PM
> To: soot-list at sable.mcgill.ca
> Subject: [Soot-list] constructors with field defaults?
>
> Is there an option that will force soot to output
> constructors that explicitly assign the default values to all
> fields that are not assigned in the source code?
>
> For example, given the following class and constructor
>
> class C {
> T x, y;
> int i;
> boolean b;
>
> C(T x) {
> this.x = x;
> }
> }
>
> I would like the soot output to look as if the constructor
> were written as follows
>
> C(T x) {
> this.x = x;
> this.y = null;
> this.i = 0;
> this.b = false;
> }
>
> Is there an option that causes soot to create these explicit
> assignments of the default values to fields?
>
> Thanks,
> Greg
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
More information about the Soot-list
mailing list