Commit a841d0eb authored by Skylot's avatar Skylot

fix: use '$' for inner classes also in methods and fields (#415)

parent e0624ce9
......@@ -116,14 +116,16 @@ class DeobfPresets {
}
}
for (FieldInfo fld : deobfuscator.getFldMap().keySet()) {
list.add(String.format("f %s = %s", fld.getFullId(), fld.getAlias()));
list.add(String.format("f %s = %s", fld.getRawFullId(), fld.getAlias()));
}
for (MethodInfo mth : deobfuscator.getMthMap().keySet()) {
list.add(String.format("m %s = %s", mth.getFullId(), mth.getAlias()));
list.add(String.format("m %s = %s", mth.getRawFullId(), mth.getAlias()));
}
Collections.sort(list);
FileUtils.writeLines(deobfMapFile, MAP_FILE_CHARSET, list);
list.clear();
if (LOG.isDebugEnabled()) {
LOG.debug("Deobfuscation map file saved as: {}", deobfMapFile);
}
}
private static void dfsPackageName(List<String> list, String prefix, PackageNode node) {
......@@ -140,11 +142,11 @@ class DeobfPresets {
}
public String getForFld(FieldInfo fld) {
return fldPresetMap.get(fld.getFullId());
return fldPresetMap.get(fld.getRawFullId());
}
public String getForMth(MethodInfo mth) {
return mthPresetMap.get(mth.getFullId());
return mthPresetMap.get(mth.getRawFullId());
}
public void clear() {
......
......@@ -57,6 +57,10 @@ public final class FieldInfo {
return declClass.getFullName() + "." + name + ":" + TypeGen.signature(type);
}
public String getRawFullId() {
return declClass.makeRawFullName() + "." + name + ":" + TypeGen.signature(type);
}
public boolean isRenamed() {
return !name.equals(alias);
}
......
......@@ -68,6 +68,10 @@ public final class MethodInfo {
return declClass.getFullName() + "." + shortId;
}
public String getRawFullId() {
return declClass.makeRawFullName() + "." + shortId;
}
/**
* Method name and signature
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment