Checks the arguments for this parameter

 @raise [MissingArgumentError] if there are not enough arguments for
        this parameter
 @since 0.3.0
765123
def check_args
      raise MissingArgumentError.new(@name) unless args_full?
      unless @arg_values.empty?
        @args.each do |name, arg|
          if @arg_values.key? name
            arg = [arg] unless arg.is_a? Array
            arg.each do |a|
              unless a =~ @arg_values[name]
                raise UnexpectedArgumentError.new(a)
              end
            end
          end
        end
      end
    end
975325
private void checkOneArg(List<String> args, int index) throws OptionException {
        if ((index + 1) >= args.size() || args.get(index + 1).startsWith("-d")) {
            String text = messager.getText("main.requires_argument", args.get(index));
            throw new OptionException(CMDERR, this::usage, text);
        }
    }
384800
def check_arguments arguments
        arguments.each_with_index do |argument, index|
          next if argument.is_a? Numeric
          next if argument.is_a? String
          next if argument.is_a? Symbol
          next if argument.is_a? Hash
          next if argument.is_a? NilClass
          next if argument.is_a? TrueClass
          next if argument.is_a? FalseClass

          raise ArgumentError, "Cannot send complex data for block argument #{index + 1}: #{argument.class.name}"
        end

        arguments
      end
955736
def __check_for_extra_arguments(self, args_required, args_allowed):
        
        assert not self.active()
        if not self.__extra_parameter_errors:
            return

        if self.__kwargs:
            param_name = self.__kwargs.keys()[0]
            if param_name in self.__params_with_arguments:
                msg = "got multiple values for parameter '%s'"
            else:
                msg = "got an unexpected keyword argument '%s'"
            self.__error(msg % (param_name,))

        if self.__args:
            def plural_suffix(count):
                if count == 1:
                    return ""
                return "s"
            def plural_was_were(count):
                if count == 1:
                    return "was"
                return "were"
            expected = args_required
            if args_required != args_allowed:
                expected = "%d to %d" % (args_required, args_allowed)
            given = self.__args_count
            msg_parts = ["takes %s positional argument" % (expected,),
                plural_suffix(expected), " but %d " % (given,),
                plural_was_were(given), " given"]
            self.__error("".join(msg_parts))
1247882
def accept_arguments(method, number_of_arguments=1):
    
    if 'method' in method.__class__.__name__:
        number_of_arguments += 1
        func = getattr(method, 'im_func', getattr(method, '__func__'))
        func_defaults = getattr(func, 'func_defaults', getattr(func, '__defaults__'))
        number_of_defaults = func_defaults and len(func_defaults) or 0
    elif method.__class__.__name__ == 'function':
        func_defaults = getattr(method, 'func_defaults', getattr(method, '__defaults__'))
        number_of_defaults = func_defaults and len(func_defaults) or 0

    coArgCount = getattr(method, 'func_code', getattr(method, '__code__')).co_argcount
    if(coArgCount >= number_of_arguments and coArgCount - number_of_defaults <= number_of_arguments):
        return True

    return False
650088
def assert_valid_arguments(func, *args, **kwargs):
    
    # get the function argspec
    argspec = getargspec(func)

    func_defaults = argspec.defaults or tuple()
    defaults = (Required,) * (len(argspec.args) - len(func_defaults)) + func_defaults
    for index, arg_name in enumerate(argspec.args):
        arg_value = args[index] if index < len(args) else kwargs.get(arg_name)
        if arg_value is not None:
            continue
        if defaults[index] is not Required:
            continue
        abort("Missing required argument: {}".format(arg_name))
323757
def <<(arg)
            case arg
            when PositionalArgument, KeywordArgument, FlagArgument, RestArgument
                if @arguments[arg.key]
                    raise ArgumentError, "An argument with key '#{arg.key}' has already been defined"
                end
                if arg.short_key && @short_keys[arg.short_key]
                    raise ArgumentError, "The short key '#{arg.short_key}' has already been registered by the '#{
                        @short_keys[arg.short_key]}' argument"
                end
                if arg.is_a?(RestArgument) && rest_args
                    raise ArgumentError, "Only one rest argument can be defined"
                end
                @arguments[arg.key] = arg
                @short_keys[arg.short_key] = arg if arg.short_key
            else
                raise ArgumentError, "arg must be an instance of PositionalArgument, KeywordArgument, " +
                    "FlagArgument or RestArgument"
            end
        end
1033914
def check_arguments(self, **kwargs):
        
        for key in kwargs:
            if key in self._rules:
                for val in kwargs[key]:
                    self._rules[key](val)
            else:
                raise LookupError("Rule for {} does not exist. Make sure the rule starts with 'rule_'".format(key))
701690
def _check_arguments(self):
        """"""
        if self.argument_checked:
            return

        assert(self.symbol is not None)
        self.argument_checked = True

        # check if symbol contain duplicated names.
        _check_arguments(self.symbol)
        # rematch parameters to delete useless ones
        if self.allow_extra_params:
            if self.arg_params:
                arg_names = set(self.symbol.list_arguments())
                self.arg_params = {k : v for k, v in self.arg_params.items()
                                   if k in arg_names}
            if self.aux_params:
                aux_names = set(self.symbol.list_auxiliary_states())
                self.aux_params = {k : v for k, v in self.aux_params.items()
                                   if k in aux_names}
1012559
def _check_command_parameters(self, **kwargs):
        
        rset = self._meta_data['required_command_parameters']
        check = _missing_required_parameters(rset, **kwargs)
        if check:
            error_message = 'Missing required params: %s' % check
            raise MissingRequiredCommandParameter(error_message)
736179
def check_parameters
      errors = ""
      @url.scan(/:(\w*)/).flatten.map(&:to_sym).each do |arg|
        errors += "<li><p>parameter '#{arg.to_s}' is required</p></li>" unless @attributes.has_key?(arg)
      end
      errors.empty? ? "" : "<ul>#{errors}</ul>"
    end
210935
def valid?(argument)
      if argument.nil? and options[:required]
        raise Templater::TooFewArgumentsError
      elsif not argument.nil?
        if options[:as] == :hash and not argument.is_a?(Hash)
          raise Templater::MalformattedArgumentError, "Expected the argument to be a Hash, but was '#{argument.inspect}'"
        elsif options[:as] == :array and not argument.is_a?(Array)
          raise Templater::MalformattedArgumentError, "Expected the argument to be an Array, but was '#{argument.inspect}'"
        end
           
        invalid = catch :invalid do
          block.call(argument) if block
          throw :invalid, :not_invalid
        end
        raise Templater::ArgumentError, invalid unless invalid == :not_invalid
      end
    end
766075
function checkArguments(node) {
            const args = node.arguments;

            switch (args.length) {
                case 0:
                    context.report({
                        node,
                        message: "Missing parameters."
                    });
                    break;

                case 1:
                    if (mode === MODE_ALWAYS) {
                        context.report({
                            node,
                            message: "Missing radix parameter."
                        });
                    }
                    break;

                default:
                    if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) {
                        context.report({
                            node,
                            message: "Redundant radix parameter."
                        });
                    } else if (!isValidRadix(args[1])) {
                        context.report({
                            node,
                            message: "Invalid radix parameter."
                        });
                    }
                    break;
            }
        }
53144
def _check_custom_url_parameters(self):
        
        for param in self.custom_url_params.keys():
            if param is not CustomUrlParam.TRANSPARENT:
                raise ValueError('Parameter {} is currently not supported.'.format(param))
626140
def check_args(self):
        
        parser = get_base_arguments(get_parser())
        parser = get_tc_arguments(parser)
        # Disable "Do not use len(SEQ) as condition value"
        # pylint: disable=C1801
        if len(sys.argv) < 2:
            self.logger.error("Icetea called with no arguments! ")
            parser.print_help()
            return False
        elif not self.args.ignore_invalid_params and self.unknown:
            self.logger.error("Unknown parameters received, exiting. "
                              "To ignore this add --ignore_invalid_params flag.")
            self.logger.error("Following parameters were unknown: {}".format(self.unknown))
            parser.print_help()
            return False
        return True
256851
def check_arguments(cls, conf):
        
        # Checking the specified list of basic health monitor plugins, which
        # should be run by the multi plugin.
        if not conf.get('multi_plugins'):
            raise ArgsError("A specification of health monitor plugins "
                            "is required (--multi_plugins).")

        # Now check parameters for all sub-plugins. We use the list of classes
        # for sub-plugins that we discovered earlier while adding parameters
        # for those sub-plugins.
        for mpc in cls.multi_plugin_classes:
            mpc.check_arguments(conf)
1044869
private void checkArgument(boolean argument, String msg, Object... args) {
        if (!argument) {
            throw new IllegalArgumentException(String.format(msg, args));
        }
    }