@Command(name = "decode", description = "Decodes messages from the journal") public class JournalDecode extends AbstractJournalCommand { @Arguments(description = "Range of message offsets to decode, e.g. single number 1234567, upper bound ..123456, lower bound 123456..., both 123456..123458") @Required private String rangeArg;
@Arguments( title = "config-file", description = "A file specifying configs for the KSQL Server, KSQL, "
@Arguments( title = "server", description = "The address of the Ksql server to connect to (ex: http://confluent.io:9098)")
public static class Delegate1 { @Arguments(description = "foo") public List<String> mainParams1 = new ArrayList<>(); }
public static class Delegate1 { @Arguments public List<String> mainParams1 = new ArrayList<>(); }
public static class Delegate2 { @Arguments public List<String> mainParams1 = new ArrayList<>(); }
public static class Delegate2 { @Arguments(description = "bar") public List<String> mainParams1 = new ArrayList<>(); }
public class AbstractGroupAnnotationCommand { @Arguments(description = "Patterns of files to be added") public List<String> patterns; @Option(name = "-i") public Boolean interactive = false; public AbstractGroupAnnotationCommand() { super(); } }
@Command(name = "test", description = "TestCommand") public static class CommandTest { @Inject public HelpOption<CommandTest> helpOption; @Arguments(description = "Patterns of files to be added") public List<String> patterns; @Option(name = "-i", description = "Interactive add mode") public Boolean interactive = false; }
@Command(name = "add", description = "Add file contents to the index") public class CommandAdd { @Inject public CommandMain commandMain; @Arguments(description = "Patterns of files to be added") public List<String> patterns; @Option(name = "-i") public Boolean interactive = false; }
@Command(name = "partial") public class PartialUnannotated { @Option(name = "--kvp", arity = 2) public List<String> kvps = new ArrayList<>(); @Arguments public List<String> args = new ArrayList<>(); }
@Command(name = "add", description = "Adds a remote") public static class RemoteAdd extends GitCommand { @Option(name = "-t", description = "Track only a specific branch") public String branch; @Arguments(description = "Name and URL of remote repository to add", title={"name", "url"}) public List<String> remote; } }
@Command(name = "ArgsRequired") public class ArgsRequired { @Arguments(description = "List of files") @Required public List<String> parameters = new ArrayList<>(); }
/** * Test parameter arity. * * @author cbeust */ @Command(name = "ArgsArityString") public class ArgsArityString { @Option(name = "-pairs", arity = 2, description = "Pairs") public List<String> pairs; @Arguments(description = "Rest") public List<String> rest; }
/** * Test restricted argument arity. */ @Command(name = "ArgsArityLimited") public class ArgsArityLimited { @Arguments(description = "Args") @MaxOccurrences(occurrences = 3) public List<String> args; }
@Command(name = "show", description = "Gives some information about the remote <name>") public static class RemoteShow extends GitCommand { @Option(name = "-n", description = "Do not query remote heads") public boolean noQuery; @Arguments(description = "Remote to show") public String remote; }
@Command(name = "commit", description = "Record changes to the repository") public class CommandCommit { @Inject public CommandMain commandMain; @Arguments(description = "List of files") public List<String> files; @Option(name = "--amend", description = "Amend") public Boolean amend = false; @Option(name = "--author") public String author; }
@Command(name = "cmd", description = "A command with an option that has a high arity option") public class CommandHighArityOption { @Inject public CommandMain commandMain; @Option(name = "--option", description = "An option with high arity", arity = 4) public List<String> option; @Option(name = "--option2", description = "Just another option") public String option2; @Arguments(description = "The rest of arguments") public List<String> args; }
@Command(name = "ArgsDefaultOptionAndArguments") public class ArgsDefaultOptionAndArguments { @Option(name = "--test", arity = 1) @Required @DefaultOption public String option; @Arguments public String arg; }
@Command(name = "partial") public class PartialAnnotated { @Option(name = "--kvp", arity = 2) @Partial(appliesTo = { 0 }, restriction = NotBlank.class) @NotBlank public List<String> kvps = new ArrayList<>(); @Arguments public List<String> args = new ArrayList<>(); }