hoseindoost / decojer

Automatically exported from code.google.com/p/decojer
0 stars 0 forks source link

inner classes synthetic argument for none-statics #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
single inner class should either:

- show synthetic field and constructor parameters
- or ignore both

currently:
- shows field, but hides constructor (example $ under uploaded)

invoke class instance creation - hide first argument:
- what if inner class unknown? show $ with argument or super/interface without
- static or not?

Original issue reported on code.google.com by andrePan...@gmail.com on 8 Oct 2011 at 8:37

GoogleCodeExporter commented 8 years ago
i have not fully understand now when outer class synthetic argument is added to 
constructor, static alone isn't the reason!
(in "class StreamFont extends PdfStream" isn't anything static)

i should instead check if the synthetic field "this$<inner_level_0_first>" 
exists and maybe the typical set pattern.

 // Field descriptor #6 Lorg/decojer/cavaj/test/DecTestInner;
  final synthetic org.decojer.cavaj.test.DecTestInner this$0;

  // Method descriptor #8 (Lorg/decojer/cavaj/test/DecTestInner;)V
  // Stack: 4, Locals: 3
  public DecTestInner$Inner1(org.decojer.cavaj.test.DecTestInner arg0);
     0  aload_0 [this]
     1  aload_1 [arg0]
     2  putfield org.decojer.cavaj.test.DecTestInner$Inner1.this$0 : org.decojer.cavaj.test.DecTestInner [10]
     5  aload_0 [this]
     6  invokespecial java.lang.Object() [12]

JDK 1.1.6 makes it slightly other and a duplication-bug:

  // Field descriptor #68 Lorg/decojer/cavaj/test/DecTestInner;
  private final synthetic org.decojer.cavaj.test.DecTestInner this$0;

  // Method descriptor #51 (Lorg/decojer/cavaj/test/DecTestInner;)V
  // Stack: 4, Locals: 3
  public DecTestInner$Inner1(org.decojer.cavaj.test.DecTestInner this$0);
     0  aload_0 [this]
     1  invokespecial java.lang.Object() [25]
     4  aload_0 [this]
     5  aload_1 [this$0]
     6  putfield org.decojer.cavaj.test.DecTestInner$Inner1.this$0 : org.decojer.cavaj.test.DecTestInner [33]
     9  aload_0 [this]
    10  aload_1 [this$0]
    11  putfield org.decojer.cavaj.test.DecTestInner$Inner1.this$0 : org.decojer.cavaj.test.DecTestInner [33]

Original comment by andrePan...@gmail.com on 16 Oct 2011 at 9:31

GoogleCodeExporter commented 8 years ago
I'll look into it soon.

Original comment by andrePan...@gmail.com on 16 Oct 2011 at 9:36

GoogleCodeExporter commented 8 years ago
works, static outer context is deciding factor

Original comment by andrePan...@gmail.com on 2 Apr 2014 at 7:29