Add @ConsumesRest annotation
未关闭
- 主要语言
- Java
- 星标
- 628
- 派生
- 150
- PR 合并指标
- 30 天内没有已合并 PR
描述
For example, I have my own parsing logic for flags where the order does not matter:
```
/mv entities --name test --eat
/mv entities --eat
/mv entities --eat --name test
```
Currently what I have to do is as ACF only allows String[] and String to parse more than 1 command arg:
```
void onCommand(... String[] flagArr) {
Flags flags = parseFlags(flagArr);
// ...
}
```
My suggestion is add a @ConsumesRest annotation which will allow our own custom classes to consume all the args as well, e.g.:
```
void onCommand(... @ConsumesRest Flags flag) {
}
// Command context for Flags will be registered
```
贡献指南
评估
这个 Issue 还没有评估数据。