05-17-2015, 08:51 AM
(This post was last modified: 05-17-2015, 03:05 PM by sothatsit.
Edit Reason: add information
)
(05-16-2015, 06:55 PM)Bibl Wrote:What is the issue with using ClassVisitors?(05-16-2015, 08:28 AM)sothatsit Wrote:nono, you can run retroguard it and the classes are renamed (still in classfile form)(05-15-2015, 06:51 AM)Bibl Wrote: just tried fernflower and the same thing is happening for me, guess you should rename with proguard or retroguard.I think I'm actually going to use asm to edit the bytecode to rename the fields/methods/classes. This is good because then I don't have to recompile the source code afterwards. Thanks for your help
i'm working on one with asm at the moment that doesnt rely on the asm visitors
http://hastebin.com/aqocujidaj.java
Just to give you an idea of what i am doing:
I am loading the classes using a ClassReader, i then use a ClassVisitor and map out all of values given for the classes/fields/methods into a ClassMap class, then i use this ClassMap to base my refactoring off of. So after that i loop through the classes from my ClassMap and do all the refactoring. My reasoning for this is that it would be a lot easier to manage super classes/interfaces by doing this as i can directly get access to all of the info whenever i need it.
I then create a RefactorMap using the ClassMap which i will later use to rename everything.
If you want to check out what i have done so far you can see it here https://github.com/Sothatsit/GamepackDownloader/