Cmd toString labels indirect impls

This commit is contained in:
Jonathan Shook 2024-01-18 00:23:12 -06:00
parent 76ab3672ac
commit 27894fd8c5

View File

@ -133,8 +133,12 @@ public class Cmd {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(cmdType.toString());
sb.append(switch (cmdType) {
case indirect -> getArgs().containsKey("_impl") ? getArgs().get("_impl").getValue() : "[]";
default -> cmdType.name();
});
for (CmdArg value : getArgs().values()) {
if (value.getParam().name.startsWith("_impl")) continue;
sb.append(" ").append(value);
}
return sb.toString();