Will return either a new ConstantLongInfo object or one already in
the constant pool. If it is a new ConstantLongInfo, it will be
inserted into the pool.
13759
static ConstantLongInfo make(ConstantPool cp, long value) {
        ConstantInfo ci = new ConstantLongInfo(value);
        return (ConstantLongInfo)cp.addConstant(ci);
    }
547435
static ConstantClassInfo make(ConstantPool cp, String className, int dim) {
        ConstantInfo ci = new ConstantClassInfo(cp, className, dim);
        return (ConstantClassInfo)cp.addConstant(ci);
    }
1175693
private ConstantPoolEntry parseConstantPoolEntry(int index)
    throws IOException
  {
    int tag = read();

    switch (tag) {
    case CP_CLASS:
      return parseClassConstant(index);
      
    case CP_FIELD_REF:
      return parseFieldRefConstant(index);
      
    case CP_METHOD_REF:
      return parseMethodRefConstant(index);
      
    case CP_INTERFACE_METHOD_REF:
      return parseInterfaceMethodRefConstant(index);
      
    case CP_STRING:
      return parseStringConstant(index);
      
    case CP_INTEGER:
      return parseIntegerConstant(index);
      
    case CP_FLOAT:
      return parseFloatConstant(index);
      
    case CP_LONG:
      return parseLongConstant(index);
      
    case CP_DOUBLE:
      return parseDoubleConstant(index);
      
    case CP_NAME_AND_TYPE:
      return parseNameAndTypeConstant(index);
      
    case CP_UTF8:
      return parseUtf8Constant(index);

    default:
      throw error(L.l("'{0}' is an unknown constant pool type.",
                      tag));
    }
  }
300557
public final InternalFactHandle newFactHandle(int id,
                                                  Object object,
                                                  ObjectTypeConf conf,
                                                  InternalWorkingMemory workingMemory,
                                                  WorkingMemoryEntryPoint wmEntryPoint) {
        return newFactHandle( id,
                              object,
                              getNextRecency(),
                              conf,
                              workingMemory,
                              wmEntryPoint );
    }
433868
public static PoolInfo createPoolInfo(PoolInfoStrings poolInfoStrings) {
    if (poolInfoStrings == null) {
      return null;
    }

    return new PoolInfo(poolInfoStrings.getPoolGroupName(),
                        poolInfoStrings.getPoolName());
  }
1302028
def method_already_there(object_type, method_name, this_class_only=False):
    
    if this_class_only:
        return method_name in vars(object_type)  # or object_type.__dict__
    else:
        try:
            method = getattr(object_type, method_name)
        except AttributeError:
            return False
        else:
            return method is not None and method is not getattr(object, method_name, None)
1033469
def new(self, data):
        
        temp = copy(self)
        temp.__init__(data)
        return temp
541444
def getLong(t):
    
    i = c_long()
    if PL_get_long(t, byref(i)):
        return i.value
    else:
        raise InvalidTypeError("long")
1003081
public EnvInfo info() {
    if (closed) {
      throw new AlreadyClosedException();
    }
    final MDB_envinfo info = new MDB_envinfo(RUNTIME);
    checkRc(LIB.mdb_env_info(ptr, info));

    final long mapAddress;
    if (info.f0_me_mapaddr.get() == null) {
      mapAddress = 0;
    } else {
      mapAddress = info.f0_me_mapaddr.get().address();
    }

    return new EnvInfo(
        mapAddress,
        info.f1_me_mapsize.longValue(),
        info.f2_me_last_pgno.longValue(),
        info.f3_me_last_txnid.longValue(),
        info.f4_me_maxreaders.intValue(),
        info.f5_me_numreaders.intValue());
  }
1374181
public Object get()
    {
        synchronized(this)
        {
            if (freePool.isEmpty() || usedPool.size() >= capacity)
            {
                try
                {
                    wait(1000);
                } 
                catch (InterruptedException e)
                {
                }

                // The timeout value was reached
                if (freePool.isEmpty())
                    add(new SimpleDateFormat());
            }

            Object o = freePool.get(0);
            freePool.remove(o);
            usedPool.add(o);
            return o;
        }
    }
1362893
public final int getConstantIndex(long constant)
    {
        for (ConstantInfo ci : listConstantInfo(ConstantLong.class))
        {
            ConstantLong ic = (ConstantLong) ci;
            if (constant == ic.getConstant())
            {
                return constantPoolIndexMap.get(ci);
            }
        }
        return -1;
    }
1197100
public PoolSchedulable getPool(PoolInfo poolInfo) {
    PoolSchedulable pool = nameToMap.get(poolInfo);
    if (pool == null) {
      pool = new PoolSchedulable(poolInfo, getType(), configManager);
      PoolSchedulable prevPool = nameToMap.putIfAbsent(poolInfo, pool);
      if (prevPool != null) {
        pool = prevPool;
      }
    }
    return pool;
  }
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;
    }
611221
void write(ByteCodeWriter out)
    throws IOException
  {
    out.write(ConstantPool.CP_LONG);
    out.writeLong(_value);
  }
779113
def source_with_constants(self, constants):
        
        old_lines = self.source().split("\n")
        info = self.__extract_info(old_lines)

        new_lines = old_lines[0:info['start_line']]

        for constant, value in sorted(constants.items()):
            new_lines.append("{0}{1} = {2}".format(info['indent'], str(constant), str(value)))

        new_lines.extend(old_lines[info['last_line']:])

        return "\n".join(new_lines)
516778
static ConstantUTFInfo make(ConstantPool cp, String str) {
        ConstantInfo ci = new ConstantUTFInfo(str);
        return (ConstantUTFInfo)cp.addConstant(ci);
    }
941386
static ConstantStringInfo make(ConstantPool cp, String str) {
        ConstantInfo ci = new ConstantStringInfo(cp, str);
        return (ConstantStringInfo)cp.addConstant(ci);
    }