Add verbose mode to RemappedRuntimeInheritanceProvider
This commit is contained in:
parent
89c00557a7
commit
718ffc8bb5
@ -33,15 +33,27 @@ public class RemappedRuntimeInheritanceProvider extends RuntimeInheritanceProvid
|
||||
// Remap the input (example: cb -> obf)
|
||||
String after = JarRemapper.mapTypeName(before, jarMapping.packages, jarMapping.classes);
|
||||
|
||||
if (verbose) {
|
||||
System.out.println("RemappedRuntimeInheritanceProvider getParents "+before+" -> "+after);
|
||||
}
|
||||
|
||||
List<String> beforeParents = super.getParents(after);
|
||||
if (beforeParents == null) {
|
||||
if (verbose) {
|
||||
System.out.println("- none");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Un-remap the output (example: obf -> cb)
|
||||
List<String> afterParents = new ArrayList<String>();
|
||||
for (String beforeParent : beforeParents) {
|
||||
afterParents.add(JarRemapper.mapTypeName(beforeParent, inverseJarMapping.packages, inverseJarMapping.classes));
|
||||
String afterParent = JarRemapper.mapTypeName(beforeParent, inverseJarMapping.packages, inverseJarMapping.classes);
|
||||
if (verbose) {
|
||||
System.out.println("- " + beforeParent + " -> " + afterParent);
|
||||
}
|
||||
|
||||
afterParents.add(afterParent);
|
||||
}
|
||||
|
||||
return afterParents;
|
||||
|
@ -35,8 +35,8 @@ import java.util.ArrayList;
|
||||
* Lookup class inheritance from classes loaded at runtime.
|
||||
*/
|
||||
public class RuntimeInheritanceProvider implements IInheritanceProvider {
|
||||
private final ClassLoader classLoader;
|
||||
private final boolean verbose;
|
||||
protected final ClassLoader classLoader;
|
||||
protected final boolean verbose;
|
||||
|
||||
public RuntimeInheritanceProvider(ClassLoader classLoader, boolean verbose) {
|
||||
this.classLoader = classLoader;
|
||||
|
Loading…
Reference in New Issue
Block a user