Adds function input variables of the given type.
493435
public FunctionInputDefBuilder vars( String type, AbstractVarDef... vars)
    {
    for( AbstractVarDef var : vars)
      {
      var.setType( type);
      functionInputDef_.addVarDef( var);
      }
    return this;
    }
1305121
protected function _addAcceptedType($type, $var = null)
    {
        if (null === $var) {
            return $this;
        }

        if (!array_key_exists($var, $this->_accept)) {
            $this->_accept[$var] = array();
        }

        $types = (array) $type;
        foreach ($types as $type) {
            if ('scalar' !== $type && 'array' !== $type) {
                $type = self::getShortClassname($type);
            }

            if (!in_array($type, $this->_accept[$var])) {
                $this->_accept[$var][] = $type;
            }
        }

        return $this;
    }
157047
protected String input (String type, String name, String extra,
                            Object defaultValue)
    {
        return fixedInput(type, name, getValue(name, defaultValue), extra);
    }
623683
def add_input(self, in_name, type_or_parse=None):
        
        if type_or_parse is None:
            type_or_parse = GenericType()
        elif not isinstance(type_or_parse, GenericType) and callable(type_or_parse):
            type_or_parse = GenericType(parse=type_or_parse)
        elif not isinstance(type_or_parse, GenericType):
            raise ValueError("the given 'type_or_parse' is invalid")
        self._inputs[in_name] = type_or_parse
569127
function addVisitFunction(type) {
    ASTVisitor.prototype['visit' + type] = function(node) {
        var self = this;
        var extraArgs = Array.prototype.slice.call(arguments, 1);

        if (DEBUG) {
            checkNode(node);
        }

        NODE_CHILDREN[type].forEach(function(property) {
            var value = node[property];

            if (_.isArray(value)) {
                value.forEach(function(item) {
                    if (item !== null) {
                        self.visit.apply(self, [item].concat(extraArgs));
                    }
                });
            } else if (value !== null && value !== undefined) {
                self.visit.apply(self, [value].concat(extraArgs));
            }
        });
    };
}
333241
function addTypeFunction (typeName, funcName, func) {
  if (!stringValue(typeName)) {
    throw new Error('Invalid "typeName" argument, must be String')
  } else if (!_.isFunction(func) && !stringValue(func)) {
    throw new Error('Invalid func argument, must be function')
  }
  _.set(this.backing, [ typeName, `_${funcName}` ], func)
  return this
}
826316
private void appendFunctionParamAnnotations(
      StringBuilder sb, FunctionType funType, Node paramNode) {
    int minArity = funType.getMinArity();
    int maxArity = funType.getMaxArity();
    List<JSType> formals = ImmutableList.copyOf(funType.getParameterTypes());
    for (int i = 0; i < formals.size(); i++) {
      sb.append(" * ");
      appendAnnotation(sb, "param", getParameterJSDocType(formals, i, minArity, maxArity));
      String parameterName = getParameterJSDocName(paramNode, i);
      sb.append(" ").append(parameterName).append("\n");
      if (paramNode != null) {
        paramNode = paramNode.getNext();
      }
    }
  }
182974
def _set_types(self):
        """"""
        # If we given something that is not an int or a float we raise
        # a RuntimeError as we do not want to have to guess if the given
        # input should be interpreted as an int or a float, for example the
        # interpretation of the string "1" vs the interpretation of the string
        # "1.0".
        for c in (self.x, self.y):
            if not ( isinstance(c, int) or isinstance(c, float) ):
                raise(RuntimeError('x, y coords should be int or float'))

        if isinstance(self.x, int) and isinstance(self.y, int):
            self._dtype = "int"
        else:
            # At least one value is a float so promote both to float.
            self.x = float(self.x)
            self.y = float(self.y)
            self._dtype = "float"
719828
public void addParameter(String name, ParameterType type) {
        parameters.put(name, new Parameter(name, type));
    }
40550
def __add_variables(self, *args, **kwargs):
        

        for variable in args:
            self.__variables[variable] = None
        self.__variables.update(kwargs)
999933
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeVariable)
        self.variables.append(codeobj)
1345640
function ( Type, Value, PlaceHolder, Container ) {
			var Input = L.DomUtil.create( 'input', 'InputClass', Container );
			Input.setAttribute( 'type' , Type );
			Input.setAttribute( 'value' , Value );
			Input.setAttribute( 'placeholder', PlaceHolder );
			
			return Input;
		}
1299602
function registerValueHandler (handlers, type, handler) {
  let typeofType = typeof type;

  if (typeofType !== 'function' && typeofType !== 'string') {
    throw new Error("type must be a class constructor or string");
  }

  if (typeof handler !== 'function') {
    throw new Error("handler must be a function");
  }

  for (let typeHandler of handlers) {
    if (typeHandler.type === type) {
      typeHandler.handler = handler;

      return;
    }
  }

  handlers.push({
    type: type,
    handler: handler,
  });
}
615891
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeExpression.TYPES)
        self.value = codeobj
936919
def add_input(self, input_):
        
        if not isinstance(input_, Input):
            raise TypeError('`input_` must be a Input instance')
        self.inputs.append(input_)
466986
function addType(typeName, type) {
	if (types[typeName]) {
		throw new Error("Type already registered '" + typeName + "'");
	}
	types[typeName] = type;
}
788842
private static void buildTypeVariableMap(ParameterizedType type,
                                             Map<TypeVariable<?>, Type> typeVariableMap) {
        if (type.getRawType() instanceof Class) {
            TypeVariable<?>[] typeVariables = ((Class<?>) type.getRawType()).getTypeParameters();
            Type[] typeArguments = type.getActualTypeArguments();

            for (int i = 0; i < typeArguments.length; i++) {
                TypeVariable<?> variable = typeVariables[i];
                Type typeArgument = typeArguments[i];

                if (typeArgument instanceof Class) {
                    typeVariableMap.put(variable, typeArgument);
                } else if (typeArgument instanceof GenericArrayType) {
                    typeVariableMap.put(variable, typeArgument);
                } else if (typeArgument instanceof ParameterizedType) {
                    typeVariableMap.put(variable, typeArgument);
                } else if (typeArgument instanceof TypeVariable) {
                    TypeVariable<?> typeVariableArgument = (TypeVariable<?>) typeArgument;
                    Type resolvedType = typeVariableMap.get(typeVariableArgument);
                    if (resolvedType == null)
                        resolvedType = resolveBound(typeVariableArgument);
                    typeVariableMap.put(variable, resolvedType);
                }
            }
        }
    }