bytecode-viewer icon indicating copy to clipboard operation
bytecode-viewer copied to clipboard

Classes are split in dozens of parts..?

Open eGit opened this issue 2 years ago • 2 comments

When I use any of the decompilers (fernflower, cfr, etc.) it produces ONE .java file despite there being many $*.class files (mostly annonymous classes).

With Bytecode-Viewer I get a 1:1 mapping. For every annonymous $.class, I get a $.java file.

Please consider allowing to change this in the settings.

eGit avatar May 17 '22 22:05 eGit

Not every decompiler of BCV decompiles the inner and anonymous classes into the original class.

Some might only do that with certain settings enabled.

Krakatau for example doesn"t do this.

Janmm14 avatar May 18 '22 08:05 Janmm14

One of the benefits to keeping it with 1:1 mapping is that it's in line with what the actual bytecode is, but if it's at all possible I would love to see a merge setting added that allows for it. I will take a look at this when I get a chance but I'm not sure what will be possible.

My guess is we're only going to be able to visualize it through the GUI, which means decompilers that don't support this built-in, wouldn't be compatible with this mode. Unless you also decompiled all of the child classes then just shoved them into the main classes output. I'm sure someone has an elegant solution to this but I haven't looked into this enough, just going off my memory here.

Konloch avatar May 20 '22 18:05 Konloch