proguard
proguard copied to clipboard
Having keyword replaced with different keywords for each instance within class
Is there a way to have keywords of the same class replaced by the same string?
I have the following code
Before obfuscation:
public class ABC { private List<DEF> results = new ArrayList<DEF>(); public List<DEF> results() { return this.results; } public void results_$eq(List<DEF> x$1) { this.results = x$1; } }
After obfuscation:
public class a { private List<b> kt = new ArrayList<b>(); public List<b> fO() { return this.kt; } public void b(List<b> paramList) { this.kt = paramList; } }
Is there a way that proguard obfuscates to
public class a { private List<b> kt = new ArrayList<b>(); public List<b> kt() { return this.kt; } public void kt(List<b> paramList) { this.kt = paramList; } }
If I understand you correctly, you want to obfuscate fields and methods that have the same original name with the same obfuscate name?
Unfortunately this is not yet supported, there is no way to instruct ProGuard to do so.
Can you explain about the rationale behind this? Why do you want this to happen? Is some consumer expecting the fields / methods being renamed consistently?