[Soot-list] constructors with field defaults?

Greg Dennis gdennis at mit.edu
Tue Apr 11 13:13:46 EDT 2006


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


More information about the Soot-list mailing list