Skip to content

Collect the option parameters into a bean #955

Closed
@timnick-snow

Description

@timnick-snow

When there are a lot of option parameters, it is more convenient to use a bean to receive them.

For example, the following usage:

    @Command(command = "foo")
    public void foo(@OptionBody FooOption fooOption) {
        //...
    }
    public static class FooOption{
        @Option(longNames = "verbose",shortNames = 'v')
        private boolean verbose;
        @Option(longNames = "other",shortNames = 'o')
        private String other;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions