You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
855 B
37 lines
855 B
10 years ago
|
package org.jetbrains.java.decompiler.modules.renamer;
|
||
10 years ago
|
|
||
|
import java.util.HashMap;
|
||
|
|
||
10 years ago
|
import org.jetbrains.java.decompiler.main.extern.IIdentifierRenamer;
|
||
10 years ago
|
|
||
|
public class PoolInterceptor {
|
||
|
|
||
|
private IIdentifierRenamer helper;
|
||
|
|
||
|
private HashMap<String, String> mapOldToNewNames = new HashMap<String, String>();
|
||
|
|
||
|
private HashMap<String, String> mapNewToOldNames = new HashMap<String, String>();
|
||
|
|
||
|
public PoolInterceptor(IIdentifierRenamer helper) {
|
||
|
this.helper = helper;
|
||
|
}
|
||
|
|
||
|
public void addName(String oldName, String newName) {
|
||
|
mapOldToNewNames.put(oldName, newName);
|
||
|
mapNewToOldNames.put(newName, oldName);
|
||
|
}
|
||
|
|
||
|
public String getName(String oldName) {
|
||
|
return mapOldToNewNames.get(oldName);
|
||
|
}
|
||
|
|
||
|
public String getOldName(String newName) {
|
||
|
return mapNewToOldNames.get(newName);
|
||
|
}
|
||
|
|
||
|
public IIdentifierRenamer getHelper() {
|
||
|
return helper;
|
||
|
}
|
||
|
|
||
|
}
|