Returns the {@link CommandServices} for this {@link AbstractCommand}.
3099
protected CommandServices getCommandServices() {
		if (commandServices == null) {
			commandServices = ValkyrieRepository.getInstance().getApplicationConfig().commandServices();
		}
		return this.commandServices;
	}
305727
public CommandInfo getCommandInfo(String commandName) {
        for (CommandInfo commandInfo : commandInfoList)
            if (commandInfo.cmd_name.toLowerCase().equals(commandName.toLowerCase()))
                return commandInfo;
        return null;
    }
1050675
public function getCommands()
    {
        foreach ($this->commands as $command) {
            if ($command instanceof \Traversable) {
                //Nested commands
                yield from $command;
            }

            yield $command;
        }
    }
334758
private <T extends CommandResultType> T getCommandResult() {
        if (commandResult == null) {
            if (getPayload() instanceof String) {
                this.commandResult = (T) marshaller.unmarshal(new StringSource(getPayload(String.class)));
            }
        }

        return (T) commandResult;
    }
662780
private List<String> buildCommand() {
        List<String> command = new ArrayList<String>();
        command.add(cmd);
        command.add("thin");
        command.add("--sourceAppPath=" + getSourceAppPath());
        command.add("--targetLibCachePath=" + getTargetLibCachePath());
        command.add("--targetThinAppPath=" + getTargetThinAppPath());
        if (getParentLibCachePath() != null) {
            command.add("--parentLibCachePath=" + getParentLibCachePath());
        }
        return command;
    }
56163
public alluxio.grpc.Command getCommand() {
    return command_ == null ? alluxio.grpc.Command.getDefaultInstance() : command_;
  }
107517
public List<String> getHelp() {

		List<String> out = new ArrayList<>();

		if (helpAppVersion != null) {
			out.add(helpAppVersion);
		}

		if (helpAppExample != null) {
			out.add(helpAppExample);
		}

		if (helpAppVersion != null || helpAppExample != null) {
	 		out.add(""); // new line
 		}

		// find longest option to format all other options by this one
		int max = 0;
		for (CommandOption option: options) {
			String command = option.toCommandString();
			max = Math.max(max, command.length());
		}

		for (CommandOption option: options) {
			String info = option.toCommandString();
			int spaces = max - info.length() + 1;

			String delimiter = new String(new char[spaces]).replace("\0", " "); // returns 'spaces' long empty string

			info = info + delimiter + option.getDescription();
			out.add(info);
		}

		return out;

	}
955651
public List<ServiceRefType<MessageDrivenBeanType<T>>> getAllServiceRef()
   {
      List<ServiceRefType<MessageDrivenBeanType<T>>> list = new ArrayList<ServiceRefType<MessageDrivenBeanType<T>>>();
      List<Node> nodeList = childNode.get("service-ref");
      for(Node node: nodeList)
      {
         ServiceRefType<MessageDrivenBeanType<T>>  type = new ServiceRefTypeImpl<MessageDrivenBeanType<T>>(this, "service-ref", childNode, node);
         list.add(type);
      }
      return list;
   }
680928
public static Map<String, String> readCommandLineOpts() {
    return org.apache.heron.api.utils.Utils.readCommandLineOpts();
  }
262921
function getCommandHelps() {
        const cmds = {},
            topics = {},
            result = ['Registered commands:'];
        let keys = {};
        Object.keys(handlers).map((key) => {
            keys[key] = 1;
        });
        Object.keys(helpTopics).map((key) => {
            keys[key] = 1;
        });
        Object.keys(keys).map((key) => {
            if (handlers[key]) {
                cmds[key] = handlers[key].help;
                if (helpTopics[key]) {
                    cmds[key] += ' *';
                }
            } else {
                topics[key] = 'Extended help topic';
            }
        });
        keys = Object.keys(cmds);
        keys.sort();
        keys.forEach((cmd) => result.push(`${cmd}: ${cmds[cmd]}`));
        keys = Object.keys(topics);
        if (keys.length) {
            result.push('');
            result.push('Help Topics:');
            keys.sort();
            keys.forEach((topic) => result.push(`${topic}: ${topics[topic]}`));
        }
        return result.join('\n');
    }
633659
public function getCommandManager()
	{
	    if ($this->commandManager === null) {
	        $this->commandManager = new CommandManager();
	        $this->commandManager->setServiceLoader($this);
	    }
	     
	    return $this->commandManager;
	}
1255104
private <T extends CommandType> T getCommand() {
        if (command == null) {
            if (getPayload() instanceof String) {
                this.command = (T) marshaller.unmarshal(new StringSource(getPayload(String.class)));
            }
        }

        return (T) command;
    }
71824
function getSubCommands(context, command) {
  var commands = cli.getMapping(context).requisition.system.commands;
  var subcommands = commands.getAll().filter(function(subcommand) {
    return subcommand.name.indexOf(command.name) === 0 &&
           subcommand.name !== command.name &&
           !subcommand.hidden;
  });

  subcommands.sort(function(c1, c2) {
    return c1.name.localeCompare(c2.name);
  });

  subcommands = subcommands.map(function(subcommand) {
    return subcommand.toJson();
  });

  return subcommands;
}
168189
public static List<String> cmd(String[] command) throws IOException, InterruptedException {
        return cmd(command, null, null, 300000L, null);
    }
1285962
public Collection<String> getCommands() {
        List<String> commands = new ArrayList<String>();
        for (String cmdOwner : m_cmdsByOwnerMap.keySet()) {
            SortedMap<String, RESTCommand> ownerCmdMap = m_cmdsByOwnerMap.get(cmdOwner);
            for (String name : ownerCmdMap.keySet()) {
                RESTCommand cmd = ownerCmdMap.get(name);
                commands.add(String.format("%s: %s = %s", cmdOwner, name, cmd.toString()));
            }
        }
        return commands;
    }
667047
function () {
            /*  determine parameters  */
            var params = $cs.params("callable", arguments, {
                name:  { pos: 0, req: true      },
                value: { pos: 1, def: undefined }
            });

            /*  find service command  */
            var subscriptions = this._subscriptions(params.name);
            if (subscriptions.length !== 1)
                return undefined;
            var cmd = subscriptions[0].func().command;

            /*  get or set "enabled" attribute  */
            return cmd.enabled(params.value);
        }
433514
private void getAllServices() {
        try {
            List<ModelServiceInstance> instances = new DirectoryServiceRestfulClient().getAllInstances();
            for (ModelServiceInstance instance :instances){
                printServiceInstance(ServiceInstanceUtils.toServiceInstance(instance));
            }
        } catch (ServiceException e) {
            e.printStackTrace();
            fail(e.getServiceDirectoryError().getErrorMessage());
        }
    }