use of picocli.CommandLine.Model.ArgGroupSpec in project keycloak by keycloak.
the class Help method optionSectionGroups.
@Override
public List<ArgGroupSpec> optionSectionGroups() {
List<ArgGroupSpec> allGroupSpecs = super.optionSectionGroups();
List<ArgGroupSpec> nonEmptyGroups = new ArrayList<>(allGroupSpecs);
Iterator<ArgGroupSpec> argGroupSpecsIt = nonEmptyGroups.iterator();
while (argGroupSpecsIt.hasNext()) {
ArgGroupSpec argGroupSpec = argGroupSpecsIt.next();
if (argGroupSpec.options().stream().anyMatch(this::isVisible)) {
continue;
}
// remove groups with no options in it
argGroupSpecsIt.remove();
}
return nonEmptyGroups;
}
Aggregations