Adds a name-and-type constant.
171210
public NameAndTypeConstant addNameAndType(String name, String type)
  {
    NameAndTypeConstant entry = getNameAndType(name, type);

    if (entry != null)
      return entry;

    Utf8Constant nameEntry = addUTF8(name);
    Utf8Constant typeEntry = addUTF8(type);

    entry = new NameAndTypeConstant(this, _entries.size(),
                                    nameEntry.getIndex(),
                                    typeEntry.getIndex());

    addConstant(entry);

    return entry;
  }
808617
def insert_constant(self, cname, ctype):
        
        index = self.lookup_symbol(cname, stype=ctype)
        if index == None:
            num = int(cname)
            if ctype == SharedData.TYPES.INT:
                if (num < SharedData.MIN_INT) or (num > SharedData.MAX_INT):
                    raise SemanticException("Integer constant '%s' out of range" % cname)
            elif ctype == SharedData.TYPES.UNSIGNED:
                if (num < 0) or (num > SharedData.MAX_UNSIGNED):
                    raise SemanticException("Unsigned constant '%s' out of range" % cname)
            index = self.insert_symbol(cname, SharedData.KINDS.CONSTANT, ctype)
        return index
590137
def add(self, name, value):
        ''''''
        normalized_name = normalize_name(name, self._normalize_overrides)
        self._map[normalized_name].append(value)
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
635191
def _add_attribute(self, name, value, allowed_values=None):
        """"""
        if value and value != 'none':

            if isinstance(value, (int, bool)):
                value = str(value)

            if allowed_values and value not in allowed_values:
                raise TypeError(
                    "Attribute '" + name + "' must be one of " + str(
                        allowed_values) + " but is '" + str(value) + "'")

            self.element_attrs[name] = value
1238721
def generic_add(a, b):
    """"""
    logger.debug('Called generic_add({}, {})'.format(a, b))
    return a + b
1249854
private void addNthOfType() {
        for (Node node : nodes) {
            int count = 1;
            Node n = DOMHelper.getPreviousSiblingElement(node);
            while (n != null) {
                if (DOMHelper.getNodeName(n).equals(DOMHelper.getNodeName(node))) {
                    count++;
                }
                
                n = DOMHelper.getPreviousSiblingElement(n);
            }
            
            if (specifier.isMatch(count)) {
                result.add(node);
            }
        }
    }
318929
public void addName(String name)
   {
      if (names.contains(name))
      {
         throw new IllegalArgumentException("already contains: " + name);
      }
      indexes.add(name);
      names.add(name);
      dirty = true;
   }
373046
def add_datatype(self, name: str, datatype: DT):
        
        self._datatypes[name] = datatype
1136093
public ConstantMethodInfo addConstantConstructor(String className,
                                                     TypeDesc[] params) {
        return addConstantMethod(className, "<init>", null, params);
    }
1097093
public FieldRefConstant addFieldRef(String className,
                                      String name,
                                      String type)
  {
    FieldRefConstant entry = getFieldRef(className, name, type);

    if (entry != null)
      return entry;

    ClassConstant classEntry = addClass(className);
    NameAndTypeConstant typeEntry = addNameAndType(name, type);

    entry = new FieldRefConstant(this, _entries.size(),
                                 classEntry.getIndex(),
                                 typeEntry.getIndex());

    addConstant(entry);

    return entry;
  }
271149
public function addType(string $name, string $type): void{
        $this->types[$name] = new Type($type);
    }
1167263
def addOutHeaderInfo(self, name, type, namespace, element_type=0,
                         mustUnderstand=0):
        """"""
        headerinfo = HeaderInfo(name, type, namespace, element_type)
        if mustUnderstand:
            headerinfo.mustUnderstand = 1
        self.outheaders.append(headerinfo)
        return headerinfo
888775
public void addVariable(String name, TypeMirror type)
    {
        localVariables.add(new LocalVariable(executableElement, type, name));
    }
581856
def add(self, name, attr=None, value=None):
        ""

        if isinstance(name, tuple) or isinstance(name, list):
            name, attr, value = self.__set_iter_value(name)

        if attr is None:
            attr = name

        if value is None:
            value = attr

        self.__data += (self.get_const_string(name=name, value=value),)
        # set attribute as slugfiy
        self.__dict__[s_attr(attr)] = self.__data[-1]
1159998
public void addConstant(ConstantPoolEntry entry)
  {
    if (entry instanceof Utf8Constant) {
      Utf8Constant utf8 = (Utf8Constant) entry;

      _utf8Map.put(utf8.getValue(), utf8);
    }

    _entries.add(entry);
  }
666755
function (newPrototype, memberName, value) {
            if (typeof value === "function") {
                this._addMethodToPrototype(newPrototype, memberName, value);
            } else {
                newPrototype[memberName] = value;
            }
        }