[ASM] Getting methods of a parent class without reflection [Fixed] - Printable Version +- The Bytecode Club - Reverse Engineering Forum (https://the.bytecode.club) +-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1) +--- Forum: Programming (https://the.bytecode.club/forumdisplay.php?fid=86) +--- Thread: [ASM] Getting methods of a parent class without reflection [Fixed] (/showthread.php?tid=1538) |
[ASM] Getting methods of a parent class without reflection [Fixed] - Dank Vader - 01-11-2016 I've fixed the bug where bytecode "contradicted" the decompiled source. It was an issue where the UTF8 strings were not being updated. Anyways moving on. I'm working on my mapping generation. It's working well except that it renames methods that it shouldn't. Example: It renames void start(Stage stage) which overrides a method in the Application class (Part of the JavaFX library). Currently since I do not include the JavaFX classes in the jar file (They come with the latest JRE) I have to resort to reflection to get the methods in parent classes. Code I have: PHP Code: private static void addMethods(MappedClass classMap) { PHP Code: /** PHP Code: /** PHP Code: /** Is there a way I could use ASM (The main library I'm working with) to achieve what I'm doing with reflection? I don't want to have to use reflection since does not statically analyze the class. If something in the static block is malicious it will be initialized when using reflection. I really don't want that... Plus reflection is extremely slow compared to pure static analysis of ASM. Edit: Well I guess this is resolved. Was informed that ClassReader can take a string parameter and do exactly what I wanted. |