code: @CLIResolver
      public static Computer resolveForCLI(
              @Argument(required=true,metaVar="NAME",usage="Agent name, or empty string for master") String name) throws CmdLineException {
          Jenkins h = Jenkins.getInstance();
          Computer item = h.getComputer(name);
          if (item==null) {
              List<String> names = ComputerSet.getComputerNames();
              String adv = EditDistance.findNearest(name, names);
              throw new IllegalArgumentException(adv == null ?
                      hudson.model.Messages.Computer_NoSuchSlaveExistsWithoutAdvice(name) :
                      hudson.model.Messages.Computer_NoSuchSlaveExists(name, adv));
          }
          return item;
      }
docs: Used for CLI binding.