From c0dc6588de59db476f0d766a3e14919521a13bfd Mon Sep 17 00:00:00 2001 From: Wagyourtail Date: Fri, 6 Dec 2024 22:44:16 -0600 Subject: [PATCH] I forgot the most important part --- src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java | 1 + src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java b/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java index cb85d8c..050d3ec 100644 --- a/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java +++ b/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java @@ -137,6 +137,7 @@ public Flags copy() { flags.allowMaven = allowMaven; flags.ignoreWarningsIn = new TreeMap<>(ignoreWarningsIn); flags.printDebug = printDebug; + flags.debugSkipStub = new HashSet<>(debugSkipStub); flags.debugSkipStubs = new HashSet<>(debugSkipStubs); flags.debugDumpClasses = debugDumpClasses; flags.multiReleaseOriginal = multiReleaseOriginal; diff --git a/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java b/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java index dda3ad3..597c28a 100644 --- a/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java +++ b/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java @@ -7,6 +7,7 @@ import xyz.wagyourtail.jvmdg.compile.ZipDowngrader; import xyz.wagyourtail.jvmdg.logging.Logger; import xyz.wagyourtail.jvmdg.util.Utils; +import xyz.wagyourtail.jvmdg.version.map.FullyQualifiedMemberNameAndDesc; import java.io.File; import java.io.IOException; @@ -38,6 +39,7 @@ public static void main(String[] args) throws IOException, ClassNotFoundExceptio new Arguments("--multiRelease", "Use semi-downgraded files for a Multi-Release jar, versions as class version (ex. \"55\" for java 11)", new String[]{"-mr"}, new String[]{"version"}), new Arguments("debug", "Set debug flags/call debug actions", null, null).addChildren( new Arguments("--print", "[Deprecated] Enable printing debug info", new String[]{"-p"}, null), + new Arguments("--skipStub", "Skip a specific class/method, of form \"Lcom/example/ClassName;\" or \"Lcom/example/ClassName;methodName;()V\"", new String[] {"-ss"}, new String[] {"stub"}), new Arguments("--skipStubs", "Skip method/class stubs for these class versions", new String[]{"-s"}, new String[]{"versions"}), new Arguments("--dumpClasses", "Dump classes to the debug folder", new String[]{"-d"}, null), new Arguments("downgradeApi", "Retrieves and downgrades the java api jar", null, new String[]{"outputPath"}) @@ -185,6 +187,12 @@ public static void debug(Map> args) throws IOException { case "--dumpClasses": flags.debugDumpClasses = true; break; + case "--skipStub": + for (String[] s : entry.getValue()) { + for (String string : s) { + flags.debugSkipStub.add(FullyQualifiedMemberNameAndDesc.of(string)); + } + } case "--skipStubs": for (String[] s : entry.getValue()) { for (String string : s) {