Will return either a new ConstantUTFInfo object or one already in
the constant pool. If it is a new ConstantUTFInfo, it will be inserted
into the pool.
516778
static ConstantUTFInfo make(ConstantPool cp, String str) {
        ConstantInfo ci = new ConstantUTFInfo(str);
        return (ConstantUTFInfo)cp.addConstant(ci);
    }
1276581
protected void returnToPool() {
        CacheEntryPool cep = cacheEntryPool;
        // An assertion failure here means this CE is being
        // returned to the pool while in use and this
        // should never be the case;
        assert refCount.get() == 0;
        if (lruHead != null)
            lruHead.remove(this);
        reset();
        cep.add(this);
    }
873429
def _newIdentifier(self):
        
        id = self._allocateID()
        self._idsToObjects[id] = self._NO_OBJECT_MARKER
        self._lastValues[id] = None
        return id
223653
void checkMethods(ClassFile cf) throws ConstantPoolException {
        for (Method m : cf.methods) {
            String mname = m.getName(cf.constant_pool);
            String desc = cf.constant_pool.getUTF8Value(m.descriptor.index);
            MethodSig sig = MethodSig.fromDesc(desc);
            DeprData dd;

            for (String parm : sig.getParameters()) {
                parm = nameFromDescType(parm);
                if (parm != null) {
                    dd = db.getTypeDeprecated(parm);
                    if (dd != null) {
                        printHasMethodParmType(cf, mname, parm, dd.isForRemoval());
                    }
                }
            }

            String ret = nameFromDescType(sig.getReturnType());
            if (ret != null) {
                dd = db.getTypeDeprecated(ret);
                if (dd != null) {
                    printHasMethodRetType(cf, mname, ret, dd.isForRemoval());
                }
            }

            // check overrides
            String overridden = resolveMember(cf, cf.getName(), mname, desc, true, false);
            if (overridden != null) {
                dd = db.getMethodDeprecated(overridden, mname, desc);
                if (dd != null) {
                    printHasOverriddenMethod(cf, overridden, mname, desc, dd.isForRemoval());
                }
            }
        }
    }
697390
def new(cls, **kwargs):
        
        kwargs = cls.preprocess_kwargs_before_new(kwargs)
        if cls.__mapper__.polymorphic_on is not None:
            discriminator_key = cls.__mapper__.polymorphic_on.name
            discriminator_val = kwargs.get(discriminator_key)
            if discriminator_val is not None and discriminator_val in cls.__mapper__.polymorphic_map:
                actual_cls = cls.__mapper__.polymorphic_map[discriminator_val].class_
                return actual_cls(
                    **subdict(
                        actual_cls._preprocess_params(kwargs),
                        actual_cls.all_settable_keys())
                )
        return cls(**subdict(cls._preprocess_params(kwargs), cls.all_settable_keys()))
334823
private Item newLong(final long value) {
        Item result = get(key.set(LONG, value));
        if (result == null) {
            pool.putByte(LONG).putLong(value);
            result = new Item(poolIndex, key);
            put(result);
            poolIndex += 2;
        }
        return result;
    }
253094
static ConstantFloatInfo make(ConstantPool cp, float value) {
        ConstantInfo ci = new ConstantFloatInfo(value);
        return (ConstantFloatInfo)cp.addConstant(ci);
    }
941386
static ConstantStringInfo make(ConstantPool cp, String str) {
        ConstantInfo ci = new ConstantStringInfo(cp, str);
        return (ConstantStringInfo)cp.addConstant(ci);
    }
775396
def new(self, data=None, dtype=None, if_fq=None):
        
        data = self.data if data is None else data

        dtype = self.type if dtype is None else dtype
        if_fq = self.if_fq if if_fq is None else if_fq

        temp = copy(self)
        temp.__init__(data, dtype, if_fq)
        return temp
1225196
def new(cls, ver_key: VerKey, sign_key: SignKey) -> 'ProofOfPossession':
        
        logger = logging.getLogger(__name__)
        logger.debug("ProofOfPossession::new: >>>")

        c_instance = c_void_p()
        do_call(cls.new_handler, ver_key.c_instance, sign_key.c_instance, byref(c_instance))

        res = cls(c_instance)

        logger.debug("ProofOfPossession::new: <<< res: %r", res)
        return res
1329788
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Terminating Descriptor already initialized')

        self.desc_tag = UDFTag()
        self.desc_tag.new(8)  # FIXME: we should let the user set serial_number

        self._initialized = True
901399
def in_scope(self, *args, **kw):
    
    new_self = self.copy()
    new_scopes = Object.translate_to_scopes(*args, **kw)
    new_self._scopes = new_self._scopes + new_scopes
    return new_self
44189
static ConstantDoubleInfo make(ConstantPool cp, double value) {
        ConstantInfo ci = new ConstantDoubleInfo(value);
        return (ConstantDoubleInfo)cp.addConstant(ci);
    }
1051862
public ConstantInfo addConstant(ConstantInfo constant) {
        ConstantInfo info = (ConstantInfo)mConstants.get(constant);
        if (info != null) {
            return info;
        }
        
        int entryCount = constant.getEntryCount();

        if (mIndexedConstants != null && mPreserveOrder) {
            int size = mIndexedConstants.size();
            mIndexedConstants.setSize(size + entryCount);
            mIndexedConstants.set(size, constant);
        }

        mConstants.put(constant, constant);
        mEntries += entryCount;

        return constant;
    }
1212653
private ExtendedInfo getInfo(Object o)
    {
        if (_info == null && o != null) {
            _info = new ExtendedInfo();
        }
        return _info;
    }
486024
def new(self, operation='no operation', **kw):
        
        self_vars = vars(self).copy()
        del self_vars['operation']
        del self_vars['children']
        del self_vars['counts']
        del self_vars['_flush']
        new = self.__class__(operation)
        vars(new).update(self_vars)
        vars(new).update(kw)
        return new
578425
def Synchronized(f):
  """"""

  @functools.wraps(f)
  def NewFunction(self, *args, **kw):
    with self.lock:
      return f(self, *args, **kw)

  return NewFunction