Cleanup output (cosmetic changes only)
This commit is contained in:
parent
03fe7d426b
commit
b69a11cf5b
@ -49,18 +49,13 @@ public class JarInheritanceProvider implements IInheritanceProvider {
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked") // Saddens me to see ASM strip vital info like that
|
@SuppressWarnings("unchecked") // Saddens me to see ASM strip vital info like that
|
||||||
public List<String> getParents(String owner) {
|
public List<String> getParents(String owner) {
|
||||||
System.out.println("jar: owner " + owner);
|
|
||||||
List<String> parents = new ArrayList<String>();
|
List<String> parents = new ArrayList<String>();
|
||||||
ClassNode node = self.getNode(owner);
|
ClassNode node = self.getNode(owner);
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
for (String iface : (List<String>) node.interfaces) {
|
for (String iface : (List<String>) node.interfaces) {
|
||||||
System.out.println("jar: add iface=" + iface);
|
|
||||||
parents.add(iface);
|
parents.add(iface);
|
||||||
}
|
}
|
||||||
System.out.println("jar: add super=" + node.superName);
|
|
||||||
parents.add(node.superName);
|
parents.add(node.superName);
|
||||||
} else {
|
|
||||||
System.out.println("jar: nothing for " + owner);
|
|
||||||
}
|
}
|
||||||
return parents;
|
return parents;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public class RuntimeInheritanceProvider implements IInheritanceProvider {
|
|||||||
clazz = ClassLoader.getSystemClassLoader().loadClass(sourceClassName); // load class without initializing
|
clazz = ClassLoader.getSystemClassLoader().loadClass(sourceClassName); // load class without initializing
|
||||||
//clazz = Class.forName(toSourceName(sourceClassName)); // runs static initializers - avoid!
|
//clazz = Class.forName(toSourceName(sourceClassName)); // runs static initializers - avoid!
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
System.out.println("RuntimeInheritanceProvider failed: " + t);
|
SpecialSource.log("RuntimeInheritanceProvider failed: " + t);
|
||||||
return parents;
|
return parents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,11 +50,11 @@ public class SpecialSource {
|
|||||||
{
|
{
|
||||||
acceptsAll(asList("?", "help"), "Show the help");
|
acceptsAll(asList("?", "help"), "Show the help");
|
||||||
|
|
||||||
acceptsAll(asList("a", "first-jar"), "First jar")
|
acceptsAll(asList("a", "first-jar"), "First jar with original names, for generating mapping")
|
||||||
.withRequiredArg()
|
.withRequiredArg()
|
||||||
.ofType(File.class);
|
.ofType(File.class);
|
||||||
|
|
||||||
acceptsAll(asList("b", "second-jar"), "Second jar")
|
acceptsAll(asList("b", "second-jar"), "Second jar with renamed names, for generating mapping")
|
||||||
.withRequiredArg()
|
.withRequiredArg()
|
||||||
.ofType(File.class);
|
.ofType(File.class);
|
||||||
|
|
||||||
@ -62,6 +62,8 @@ public class SpecialSource {
|
|||||||
.withRequiredArg()
|
.withRequiredArg()
|
||||||
.ofType(File.class);
|
.ofType(File.class);
|
||||||
|
|
||||||
|
acceptsAll(asList("c", "compact"), "Output mapping file in compact format");
|
||||||
|
|
||||||
acceptsAll(asList("m", "srg-in"), "Mapping file input")
|
acceptsAll(asList("m", "srg-in"), "Mapping file input")
|
||||||
.withRequiredArg()
|
.withRequiredArg()
|
||||||
.ofType(File.class);
|
.ofType(File.class);
|
||||||
@ -81,7 +83,6 @@ public class SpecialSource {
|
|||||||
acceptsAll(asList("l", "live"), "Enable runtime inheritance lookup");
|
acceptsAll(asList("l", "live"), "Enable runtime inheritance lookup");
|
||||||
|
|
||||||
acceptsAll(asList("q", "quiet"), "Quiet mode");
|
acceptsAll(asList("q", "quiet"), "Quiet mode");
|
||||||
acceptsAll(asList("c", "compact"), "Output mapping file in compact format");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -140,7 +141,7 @@ public class SpecialSource {
|
|||||||
|
|
||||||
if (options.has("in-jar")) {
|
if (options.has("in-jar")) {
|
||||||
if (!options.has("out-jar")) {
|
if (!options.has("out-jar")) {
|
||||||
System.err.println("No output jar given, in-jar requires in-jar");
|
System.err.println("No output jar given, in-jar requires out-jar");
|
||||||
parser.printHelpOn(System.err);
|
parser.printHelpOn(System.err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -160,8 +161,8 @@ public class SpecialSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void log(String message) {
|
public static void log(String message) {
|
||||||
if (!options.has("q")) {
|
if (!options.has("quiet")) {
|
||||||
System.out.println(message);
|
System.out.println(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user