public ArgumentCompleter(ActionCommand command, boolean scoped) {
this.command = command;
Class<?> actionClass = command.getActionClass();
// Command name completer
Command cmd = actionClass.getAnnotation(Command.class);
String[] names = scoped || Session.SCOPE_GLOBAL.equals(cmd.scope()) ? new String[] { cmd.name() } : new String[] { cmd.name(), cmd.scope() + ":" + cmd.name() };
commandCompleter = new StringsCompleter(names);
// Build options completer
for (Class<?> type = actionClass; type != null; type = type.getSuperclass()) {
for (Field field : type.getDeclaredFields()) {
Option option = field.getAnnotation(Option.class);