private static Object getOptionValue(Method method, String name, CommandLine commandLine) { final io.vertx.core.cli.Option option = commandLine.cli().getOption(name); if (option == null) { return null; } boolean multiple = ReflectionUtils.isMultiple(method); if (multiple) { return createMultiValueContainer(method, commandLine.getOptionValues(name)); } return commandLine.getOptionValue(name); }
private static Object getArgumentValue(Method method, int index, CommandLine commandLine) { final io.vertx.core.cli.Argument argument = commandLine.cli().getArgument(index); if (argument == null) { return null; } boolean multiple = ReflectionUtils.isMultiple(method); if (multiple) { return createMultiValueContainer(method, commandLine.getArgumentValues(argument.getIndex())); } return commandLine.getArgumentValue(argument.getIndex()); }
private static Object getOptionValue(Method method, String name, CommandLine commandLine) { final io.vertx.core.cli.Option option = commandLine.cli().getOption(name); if (option == null) { return null; } boolean multiple = ReflectionUtils.isMultiple(method); if (multiple) { return createMultiValueContainer(method, commandLine.getOptionValues(name)); } return commandLine.getOptionValue(name); }
private static Object getArgumentValue(Method method, int index, CommandLine commandLine) { final io.vertx.core.cli.Argument argument = commandLine.cli().getArgument(index); if (argument == null) { return null; } boolean multiple = ReflectionUtils.isMultiple(method); if (multiple) { return createMultiValueContainer(method, commandLine.getArgumentValues(argument.getIndex())); } return commandLine.getArgumentValue(argument.getIndex()); }