Set the name that a class should be known as to something other than the
class name.
519582
public static synchronized void setName(Class writableClass, String name) {
    CLASS_TO_NAME.put(writableClass, name);
    NAME_TO_CLASS.put(name, writableClass);
  }
1120001
def name(self, value):
        """"""
        self._name = value
        # generate slug
        if not self.slug:
            self.slug = KnwKB.generate_slug(value)
933231
def add(cls, name, value):
        """"""
        attr = cls(value)
        attr._name = name
        setattr(cls, name, attr)
470778
def add_to_class(self, cls, name):
        '''
        
        '''
        self._name = name
        self._container_model_class = cls
        setattr(cls, name, FieldDescriptor(self))
        self._bound = True
717644
def update_name(self, name):
        """"""
        if name != self.name:
            self.parent.executables[name] = self
            del self.parent.executables[self.name]
            self.name = name
230541
def from_name(cls, name):
        """"""
        self = cls.__new__(cls)  # TODO
        self.original_literal = name

        r, g, b, a = COLOR_NAMES[name]

        self.value = r, g, b, a
        return self
788147
public void setName(String name) {
        mName = name;
        if (mSceneObject != null) {
            mSceneObject.setName(name);
        }
    }
313272
def get_name(cls):
        
        if not hasattr(cls.Meta, 'name'):
            class_name = getattr(cls.get_model(), '__name__', None)
            setattr(
                cls.Meta,
                'name',
                inflection.underscore(class_name) if class_name else None
            )

        return cls.Meta.name
680985
def default_name(self, separator='-'):
        """"""
        return self.__class__.__name__ + '{}{:03d}'.format(
            separator, self._index+1)
988185
def name(class_name: str, chain_class: Type[BaseChain]) -> Type[BaseChain]:
    
    return chain_class.configure(__name__=class_name)
446948
public void setName(final String newName) {
        String oldName = this.name;
        this.name = newName;
        propertySupport.firePropertyChange("name", oldName, this.name);
    }
767409
def _update_class(self, oldclass, newclass):
        """"""
        olddict = oldclass.__dict__
        newdict = newclass.__dict__

        oldnames = set(olddict)
        newnames = set(newdict)

        for name in newnames - oldnames:
            setattr(oldclass, name, newdict[name])
            notify_info0('Added:', name, 'to', oldclass)
            self.found_change = True

        # Note: not removing old things...
        # for name in oldnames - newnames:
        #    notify_info('Removed:', name, 'from', oldclass)
        #    delattr(oldclass, name)

        for name in (oldnames & newnames) - set(['__dict__', '__doc__']):
            self._update(oldclass, name, olddict[name], newdict[name], is_class_namespace=True)

        old_bases = getattr(oldclass, '__bases__', None)
        new_bases = getattr(newclass, '__bases__', None)
        if str(old_bases) != str(new_bases):
            notify_error('Changing the hierarchy of a class is not supported. %s may be inconsistent.' % (oldclass,))

        self._handle_namespace(oldclass, is_class_namespace=True)
1051320
public void setClassname(final String className) {
    Object proc = null;
    try {
      final Class<?> implClass = ProjectDef.class.getClassLoader().loadClass(className);
      try {
        final Method getInstance = implClass.getMethod("getInstance");
        proc = getInstance.invoke(null);
      } catch (final Exception ex) {
        proc = implClass.newInstance();
      }
    } catch (final Exception ex) {
      throw new BuildException(ex);
    }
    this.projectWriter = (ProjectWriter) proc;
  }
1264536
def name(cls):
        """"""
        name = cls.__name__.replace("_", "-").lower()
        name = name[4:] if name.startswith("cmd-") else name
        return name
264007
public void setName(String name) {

        m_name = name;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_SET_NAME_1, name));
        }
    }
950672
public void setName(String name) {
        put(PdfName.NAME, new PdfString(name, PdfObject.TEXT_UNICODE));
    }
724303
def set_name(self, name, kind_attr=None):
        
        self.name = name
        self.kind_attr = kind_attr or "{name}_kind".format(name=name)
        if self.cname is None:
            self.cname = name

        return self