add various getAt and setAt methods for primitive arrays
@param receiver the receiver class
@param name  the name of the method
@param args the argument classes
548637
private void addArrayMethods(List<MethodNode> methods, ClassNode receiver, String name, ClassNode[] args) {
        if (args.length!=1) return;
        if (!receiver.isArray()) return;
        if (!isIntCategory(getUnwrapper(args[0]))) return;
        if ("getAt".equals(name)) {
            MethodNode node = new MethodNode(name, Opcodes.ACC_PUBLIC, receiver.getComponentType(), new Parameter[]{new Parameter(args[0],"arg")}, null, null);
            node.setDeclaringClass(receiver.redirect());
            methods.add(node);
        } else if ("setAt".equals(name)) {
            MethodNode node = new MethodNode(name, Opcodes.ACC_PUBLIC, VOID_TYPE, new Parameter[]{new Parameter(args[0],"arg")}, null, null);
            node.setDeclaringClass(receiver.redirect());
            methods.add(node);
        }
    }
1110966
public static void notEmpty(final String arg, final String name) {
        if(arg == null) {
            throw new NullPointerException(String.format("%s should not be null.", name));
        }
        
        if(arg.isEmpty()) {
            throw new IllegalArgumentException(String.format("%s should not be empty.", name));
        }
    }
1074923
protected void addFormParam(Form formData, String name, Object value) throws IllegalArgumentException {
        addFormParam(formData, name, value, false);
    }
248869
public void addArgument(Setter setter, Argument a) {
        checkNonNull(setter, "Setter");
        checkNonNull(a, "Argument");
        
        OptionHandler h = createOptionHandler(new OptionDef(a,setter.isMultiValued()),setter);
    	int index = a.index();
    	// make sure the argument will fit in the list
    	while (index >= arguments.size()) {
    		arguments.add(null);
    	}
    	if(arguments.get(index)!=null) {
            throw new IllegalAnnotationError(Messages.MULTIPLE_USE_OF_ARGUMENT.format(index));
        }
    	arguments.set(index, h);
    }
479990
public final void setArgs(String... args) throws CmdArgsException
    {
        try
        {
            options = new HashMap<>();
            Option opt = null;
            int index = 0;
            for (String arg : args)
            {
                if (opt != null)
                {
                    options.put(opt.name, ConvertUtility.convert(opt.cls, arg));
                    opt = null;
                }
                else
                {
                    if (map.containsKey(arg))
                    {
                        opt = map.get(arg);
                        if (opt.exclusiveGroup != null)
                        {
                            if (effectiveGroup != null && !effectiveGroup.equals(opt.exclusiveGroup))
                            {
                                throw new CmdArgsException(opt.exclusiveGroup+" mix with "+effectiveGroup, this);
                            }
                            effectiveGroup = opt.exclusiveGroup;
                        }
                    }
                    else
                    {
                        break;
                    }
                }
                index++;
            }
            // defaults
            for (Option o : map.values())
            {
                if (!o.mandatory && !options.containsKey(o.name))
                {
                    options.put(o.name, o.defValue);
                }
            }
            int len = args.length-index;
            if (hasArrayArgument)
            {
                if (len < types.size())
                {
                    throw new CmdArgsException("too few arguments", this);
                }
            }
            else
            {
                if (len != types.size())
                {
                    throw new CmdArgsException("wrong number of arguments", this);
                }
            }
            arguments = new HashMap<>();
            int arraySize = len - types.size() + 1;
            int arrayIndex = Integer.MAX_VALUE;
            Object array = null;
            Class<?> componenType = null;
            if (hasArrayArgument)
            {
                arrayIndex = types.size()-1;
                Class<?> arrayType = types.get(arrayIndex);
                componenType = arrayType.getComponentType();
                array = Array.newInstance(componenType, arraySize);
                arguments.put(names.get(arrayIndex), array);
            }
            for (int ii=0;ii<len;ii++)
            {
                if (ii < arrayIndex)
                {
                    Object value = ConvertUtility.convert(types.get(ii), args[ii+index]);
                    arguments.put(names.get(ii), value);
                }
                else
                {
                    Object value = ConvertUtility.convert(componenType, args[ii+index]);
                    Array.set(array, ii - arrayIndex, value);
                }
            }
            for (Option o : map.values())
            {
                if (o.mandatory && !options.containsKey(o.name))
                {
                    throw new CmdArgsException("mandatory option "+o.name+": "+o.description+" missing", this);
                }
            }
            if (effectiveGroup != null)
            {
                for (Option o : groups.get(effectiveGroup))
                {
                    if (o.mandatory && !options.containsKey(o.name))
                    {
                        throw new CmdArgsException(effectiveGroup+" option "+o.name+": "+o.description+" missing", this);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            throw new CmdArgsException(ex, this);
        }
    }
304106
public void setParameter(final String name, final String value) {
		String[] currentValue = (String[]) parameters.get(name);

		if (currentValue == null) {
			currentValue = new String[]{value};
		} else {
			// convert the current values into a new array..
			String[] newValues = new String[currentValue.length + 1];
			System.arraycopy(currentValue, 0, newValues, 0, currentValue.length);
			newValues[newValues.length - 1] = value;
			currentValue = newValues;
		}

		parameters.put(name, currentValue);
	}
166246
public void setBroadcastVariable(String name, Operator<?> root) {
		if (name == null) {
			throw new IllegalArgumentException("The broadcast input name may not be null.");
		}
		if (root == null) {
			throw new IllegalArgumentException("The broadcast input root operator may not be null.");
		}
		
		this.broadcastInputs.put(name, root);
	}
607166
public void setArgs(String[] args) {
        if (args == null) {
            args = new String[]{};
        }
        this.args = args;
        this.argsList = Collections.unmodifiableList(new ArrayList<String>(Arrays.asList(args)));
    }
1073980
public void postMessage (String name, Object... args)
    {
        postMessage(Transport.DEFAULT, name, args);
    }
384431
@Override
	protected void processFeatureNames(QualifiedName name, NameAcceptor acceptor) {
		QualifiedName methodName = operatorMapping == null? null : operatorMapping.getMethodName(name);
		if (methodName != null) {
			acceptor.accept(methodName.toString(), 2);
			QualifiedName simpleOperator = operatorMapping.getSimpleOperator(name);
			if (simpleOperator != null) {
				QualifiedName simpleMethodName = operatorMapping.getMethodName(simpleOperator);
				if (simpleMethodName != null) {
					acceptor.accept(simpleMethodName.toString(), 3);
				}
			}
		} else {
			acceptor.accept(name.toString(), 1);
			processAsPropertyNames(name, acceptor);
		}
	}
696953
public static void setFieldValue(final Object target, final String name, final Object value) {
		Field field = FieldUtils.getDeclaredField(target.getClass(), name, true);

		if (field == null) {
			throw new IllegalArgumentException("Could not find field [" + name + "] on target [" + target + ']');
		}

		try {
			field.set(target, value);
		} catch (IllegalAccessException e) {
			throw new ImpossibleException(e);
		}
	}
662910
public T invoke(RT receiver, Object... arguments) {
		assert receiver != null;
		final Method method;
		synchronized (this) {
			if (this.method == null) {
				this.method = getMethod(receiver, arguments);
				method = this.method;
			} else {
				method = this.method;
			}
		}
		try {
			return this.returnType.cast(method.invoke(receiver, arguments));
		} catch (RuntimeException | Error exception) {
			throw exception;
		} catch (Throwable exception) {
			throw new RuntimeException(exception);
		}
	}
957374
public final void setParameter(String name, Object value) {
        if (isNative()) {
            bindParameters.add(new BindParameter(name, value));
        } else {
            setParameterValue(":" + name, value);
        }

        parametersMap.put(":" + name, value);
    }
144484
public final <T> void addArgument(Class<T> cls, String name)
    {
        if (map.containsKey(name))
        {
            throw new IllegalArgumentException(name+" is already added as option");
        }
        if (hasArrayArgument)
        {
            throw new IllegalArgumentException("no argument allowed after array argument");
        }
        types.add(cls);
        names.add(name);
        if (cls.isArray())
        {
            hasArrayArgument = true;
        }
    }
1205299
public boolean add(String name, Object value)
    {
        if(name == null)
            throw new NullPointerException("name == null");
        add(name);
        add(value.toString());
        return true;
    }
837372
def add_receiver(self, receiver):
        
        if not callable(receiver):
            raise TypeError("receiver must be callable")
        self.event_receivers.append(receiver)
1124268
@Configurable
  public void addArg(String arg)
  {
    if (_args == null)
      _args = new ArrayList<String>();
    
    _args.add(arg);
  }