When obfuscating .class files annotations are removed. Is there a way to obfuscate these files(files containing annotations) without removing them. Is there a way to obfuscate non compiled .java files to preserve annotations, if it’s possible?
How does java compiler treat annotations and where are they preserved? why after obfuscation all the annotations are removed. Can’t I, after obfuscating the classes, bring back the annotations and put them back in their place in order to work?
I asked and researched on annotations and obfuscation and I’ve found the following:
and it’s very hard to manipulate them. Obfuscation programs don’t deal with such classes
ones, but neither of them could obfuscate annotated classes that have
all of their fields and methods annotated
files instead of annotations