Add a new EnumDescriptor named name with the given enum values.
165395
def AddEnumDescriptor(self, name, description,
                          enum_values, enum_descriptions):
        """"""
        message = extended_descriptor.ExtendedEnumDescriptor()
        message.name = self.__names.ClassName(name)
        message.description = util.CleanDescription(description)
        self.__DeclareDescriptor(message.name)
        for index, (enum_name, enum_description) in enumerate(
                zip(enum_values, enum_descriptions)):
            enum_value = extended_descriptor.ExtendedEnumValueDescriptor()
            enum_value.name = self.__names.NormalizeEnumName(enum_name)
            if enum_value.name != enum_name:
                message.enum_mappings.append(
                    extended_descriptor.ExtendedEnumDescriptor.JsonEnumMapping(
                        python_name=enum_value.name, json_name=enum_name))
                self.__AddImport('from %s import encoding' %
                                 self.__base_files_package)
            enum_value.number = index
            enum_value.description = util.CleanDescription(
                enum_description or '<no description>')
            message.values.append(enum_value)
        self.__RegisterDescriptor(message)
922513
public WebAppDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
483581
def withNamedBits(cls, **values):
        
        enums = set(cls.namedValues.items())
        enums.update(values.items())

        class X(cls):
            namedValues = namedval.NamedValues(*enums)

        X.__name__ = cls.__name__
        return X
729901
public void addChange(String name, Enum<?> before, Enum<?> after) {
        String beforeStr = before != null ? before.name() : null;
        String afterStr = after != null ? after.name() : null;
        addChange(name, beforeStr, afterStr);
    }
930905
public <TEnum extends Enum<TEnum>> void setEnum(Enum<?> key, TEnum value)
    {
        if (key == null)
        {
            return;
        }

        setEnum(key.name(), value);
    }
165969
private void addArcInitialization(EnumDeclaration node) {
    String enumClassName = nameTable.getFullName(node.getTypeElement());
    List<Statement> stmts = node.getClassInitStatements().subList(0, 0);
    int i = 0;
    for (EnumConstantDeclaration constant : node.getEnumConstants()) {
      VariableElement varElement = constant.getVariableElement();
      ClassInstanceCreation creation = new ClassInstanceCreation(constant.getExecutablePair());
      TreeUtil.copyList(constant.getArguments(), creation.getArguments());
      Expression constName = options.stripEnumConstants()
          ? new StringLiteral("JAVA_LANG_ENUM_NAME_STRIPPED", typeUtil)
          : new NativeExpression(
            UnicodeUtils.format("JreEnumConstantName(%s_class_(), %d)", enumClassName, i),
            typeUtil.getJavaString().asType());
      creation.addArgument(constName);
      creation.addArgument(new NumberLiteral(i++, typeUtil));
      creation.setHasRetainedResult(true);
      stmts.add(new ExpressionStatement(new Assignment(new SimpleName(varElement), creation)));
    }
  }
564135
public WebFacesConfigDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
590137
def add(self, name, value):
        ''''''
        normalized_name = normalize_name(name, self._normalize_overrides)
        self._map[normalized_name].append(value)
1331811
private void addNewGenderName(EntityIdValue entityIdValue, String name) {
		this.genderNames.put(entityIdValue, name);
		this.genderNamesList.add(entityIdValue);
	}
1325463
def enum(cls, options, values):
    """"""
    names, real = zip(*options)
    del names  # unused

    def factory(i, name):
      return cls(i, name, (len(real),), lambda a: real[a[0]], values)
    return factory
284637
public static function addEnum(EnumId $enumId, EnumDescriptor $enum)
    {
        self::$enums[$enumId->toString()] = $enum;
        ksort(self::$enums);
    }
698320
public EncryptionMaterials addDescription(String name, String value) {
        desc.put(name, value);
        return this;
    }
426148
public ObjectNameBuilder addProperty(String key, String value) {
    nameStrBuilder.append(sanitizeValue(key))
        .append('=')
        .append(sanitizeValue(value)).append(",");
    return this;
  }
1036490
public AnnotationDescr addAnnotation( String name,
                                          String value ) {
        if ( this.annotations == null ) {
            this.annotations = new HashMap<String, AnnotationDescr>();
        } else {
            AnnotationDescr existingAnnotation = annotations.get( name );
            if (existingAnnotation != null) {
                existingAnnotation.setDuplicated();
                return existingAnnotation;
            }
        }
        AnnotationDescr annotation = new AnnotationDescr( name,
                                                          value );
        annotation.setResource(getResource());
        return this.annotations.put( annotation.getName(),
                                     annotation );
    }
234301
public static ResourceKey key(Class<?> clazz, Enum<?> value) {
        return new ResourceKey(clazz.getName(), value.name());
    }
637965
def renum(type_name, values = :defined_in_block, &block)
      nest = self.is_a?(Module) ? self : Object
      EnumeratedValueTypeFactory.create(nest, type_name, values, &block)
    end
647276
public ConnectorDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }