use of org.jboss.galleon.cli.PmCommandInvocation in project galleon by wildfly.
the class AbstractDynamicCommand method buildCommand.
private MapProcessedCommand buildCommand() throws CommandLineParserException {
MapProcessedCommandBuilder<PmCommandInvocation> builder = MapProcessedCommandBuilder.builder();
builder.command(this);
builder.lookupAtCompletionOnly(onlyAtCompletion);
builder.name(getName());
builder.activator(getActivator());
List<ProcessedOption> otherOptions = getStaticOptions();
for (ProcessedOption o : otherOptions) {
staticOptions.add(o.name());
if (o.name().equals(ARGUMENT_NAME)) {
if (o.hasMultipleValues()) {
builder.arguments(o);
} else {
builder.argument(o);
}
} else {
builder.addOption(o);
}
}
builder.description(getDescription());
builder.optionProvider(new DynamicOptionsProvider());
return builder.create();
}
Aggregations