Add support for loading multiple mappings

New loadMappings() method in JarMapping, can be called to merge two
mapping files. Useful for loading both 1.4.6 and 1.4.7 (relocated).
This commit is contained in:
Agaricus 2013-01-23 22:40:15 -08:00
parent 112f780e85
commit 0ea3957d6f

View File

@ -42,6 +42,10 @@ public class JarMapping {
}
public JarMapping(BufferedReader reader, ShadeRelocationSimulator shader) throws IOException {
loadMappings(reader, shader);
}
/**
* Load a mapping given a .csrg file
*
@ -50,7 +54,7 @@ public class JarMapping {
* relocation
* @throws IOException
*/
public JarMapping(BufferedReader reader, ShadeRelocationSimulator shader) throws IOException {
public void loadMappings(BufferedReader reader, ShadeRelocationSimulator shader) throws IOException {
if (shader == null) {
shader = ShadeRelocationSimulator.IDENTITY;
}