From e27d5967029f4f3da8889dd673ba516dcd9f3ac8 Mon Sep 17 00:00:00 2001 From: gegy1000 Date: Sun, 16 Jun 2019 23:49:25 +0200 Subject: Plugin rework along with API rework: Enigma split from EnigmaProject; plugins now provide services configurable via a profile --- .../java/cuchaz/enigma/translation/mapping/EntryRemapper.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/java/cuchaz/enigma/translation') diff --git a/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java b/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java index 8c4a326..c9808cc 100644 --- a/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java +++ b/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java @@ -21,7 +21,7 @@ public class EntryRemapper { private final MappingValidator validator; - public EntryRemapper(JarIndex jarIndex, EntryTree obfToDeobf) { + private EntryRemapper(JarIndex jarIndex, EntryTree obfToDeobf) { this.obfToDeobf = new DeltaTrackingTree<>(obfToDeobf); this.obfResolver = jarIndex.getEntryResolver(); @@ -31,8 +31,12 @@ public class EntryRemapper { this.validator = new MappingValidator(obfToDeobf, deobfuscator, jarIndex); } - public EntryRemapper(JarIndex jarIndex) { - this(jarIndex, new HashEntryTree<>()); + public static EntryRemapper mapped(JarIndex index, EntryTree obfToDeobf) { + return new EntryRemapper(index, obfToDeobf); + } + + public static EntryRemapper empty(JarIndex index) { + return new EntryRemapper(index, new HashEntryTree<>()); } public > void mapFromObf(E obfuscatedEntry, @Nullable EntryMapping deobfMapping) { -- cgit v1.2.3