将方法绑定到 JCommander 参数

问题描述

我有很多 CLI 布尔参数指定设置。

有没有办法将方法绑定到参数,以便在参数存在时调用它,还是我必须手动检查参数?

我正在寻找类似的东西:

@Parameter(
            names={"-s","--save"},description = "Save the results of the process",function = SaveResults)
boolean save;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)