diff --git a/src/main/java/net/md_5/specialsource/JarMapping.java b/src/main/java/net/md_5/specialsource/JarMapping.java index a2c2f8c..994cfe7 100644 --- a/src/main/java/net/md_5/specialsource/JarMapping.java +++ b/src/main/java/net/md_5/specialsource/JarMapping.java @@ -49,7 +49,7 @@ public class JarMapping { public final Map methods = new HashMap(); private InheritanceMap inheritanceMap = new InheritanceMap(); private InheritanceProvider fallbackInheritanceProvider = null; - private Set ignoredPackages = new HashSet(); + private Set excludedPackages = new HashSet(); public JarMapping() { } @@ -75,13 +75,13 @@ public class JarMapping { * Add a class name prefix to the mapping ignore list. * Note: this only applies before loading mappings, not after */ - public void addProtectedPackage(String packageName) { + public void addExcludedPackage(String packageName) { SpecialSource.log("Protecting Package: " + packageName); - ignoredPackages.add(packageName); + excludedPackages.add(packageName); } - private boolean isProtectedPackage(String desc) { - for (String packageName : ignoredPackages) { + private boolean isExcludedPackage(String desc) { + for (String packageName : excludedPackages) { if (desc.startsWith(packageName)) { return true; } @@ -325,7 +325,7 @@ public class JarMapping { oldClassName = temp; } - if (isProtectedPackage(oldClassName)) { + if (isExcludedPackage(oldClassName)) { SpecialSource.log("Ignored CL: " + oldClassName + " " + newClassName); return; } @@ -354,7 +354,7 @@ public class JarMapping { oldPackageName = temp; } - if (isProtectedPackage(oldPackageName)) { + if (isExcludedPackage(oldPackageName)) { SpecialSource.log("Ignored PK: " + oldPackageName + " -> " + newPackageName); return; } @@ -399,7 +399,7 @@ public class JarMapping { oldFieldName = temp; } - if (isProtectedPackage(oldClassName)) { + if (isExcludedPackage(oldClassName)) { SpecialSource.log("Ignored FD: " + oldClassName + "/" + oldFieldName + " -> " + newFieldName); return; } @@ -434,7 +434,7 @@ public class JarMapping { oldMethodName = temp; } - if (isProtectedPackage(oldClassName)) { + if (isExcludedPackage(oldClassName)) { SpecialSource.log("Ignored MD: " + oldClassName + "/" + oldMethodName + " -> " + newMethodName); return; } diff --git a/src/main/java/net/md_5/specialsource/SpecialSource.java b/src/main/java/net/md_5/specialsource/SpecialSource.java index 414d96f..5c07aaa 100644 --- a/src/main/java/net/md_5/specialsource/SpecialSource.java +++ b/src/main/java/net/md_5/specialsource/SpecialSource.java @@ -121,7 +121,7 @@ public class SpecialSource { acceptsAll(asList("d", "identifier"), "Identifier to place on each class that is transformed, by default, none") .withRequiredArg() .ofType(String.class); - acceptsAll(asList("p", "ignored-packages"), "A comma seperated list of packages that should not be transformed, even if the srg specifies they should") + acceptsAll(asList("e", "excluded-packages"), "A comma seperated list of packages that should not be transformed, even if the srg specifies they should") .withRequiredArg() .ofType(String.class); } @@ -162,10 +162,10 @@ public class SpecialSource { identifier = (String)options.valueOf("identifier"); } - String[] ignored = new String[0]; - if (options.has("ignored-packages")) + String[] excluded = new String[0]; + if (options.has("excluded-packages")) { - ignored = ((String)options.valueOf("ignored-packages")).split(","); + excluded = ((String)options.valueOf("excluded-packages")).split(","); } FileLocator.useCache = !options.has("force-redownload"); @@ -182,17 +182,17 @@ public class SpecialSource { visit(new Pair(jar1, jar2), new Pair(visitor1, visitor2), new Pair(jar1.getMain(), jar2.getMain())); jarMapping = new JarMapping(visitor1, visitor2, (File) options.valueOf("srg-out"), options.has("compact"), options.has("generate-dupes")); - for (String pkg : ignored) + for (String pkg : excluded) { - jarMapping.addProtectedPackage(pkg); + jarMapping.addExcludedPackage(pkg); } } else if (options.has("srg-in")) { log("Loading mappings"); jarMapping = new JarMapping(); - for (String pkg : ignored) + for (String pkg : excluded) { - jarMapping.addProtectedPackage(pkg); + jarMapping.addExcludedPackage(pkg); } // Loading options