return a generic Statement for the given ClassDescriptor
347456
public PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql,
                                                  boolean scrollable, int explicitFetchSizeHint, boolean callableStmt)
            throws PersistenceBrokerException
    {
        try
        {
            return cds.getStatementsForClass(m_conMan).getPreparedStmt(m_conMan.getConnection(), sql, scrollable, explicitFetchSizeHint, callableStmt);
        }
        catch (LookupException e)
        {
            throw new PersistenceBrokerException("Used ConnectionManager instance could not obtain a connection", e);
        }
    }
851142
<T extends ValueDescriptor<?>> T getValueDescriptor(Class<T> valueDescriptorType) {
        return scannerContext.getStore().create(valueDescriptorType);
    }
935007
protected int getRefIndex(Class<? extends Ref> refType, String fullyQualifiedname, String name, String descriptor)
    {
        String internalForm = fullyQualifiedname.replace('.', '/');
        for (ConstantInfo ci : listConstantInfo(refType))
        {
            Ref mr = (Ref) ci;
            int classIndex = mr.getClass_index();
            Clazz clazz = (Clazz) getConstantInfo(classIndex);
            String cn = getString(clazz.getName_index());
            if (internalForm.equals(cn))
            {
                int nameAndTypeIndex = mr.getName_and_type_index();
                NameAndType nat = (NameAndType) getConstantInfo(nameAndTypeIndex);
                int nameIndex = nat.getName_index();
                String str = getString(nameIndex);
                if (name.equals(str))
                {
                    int descriptorIndex = nat.getDescriptor_index();
                    String descr = getString(descriptorIndex);
                    if (descriptor.equals(descr))
                    {
                        return constantPoolIndexMap.get(ci);
                    }
                }
            }
        }
        return -1;
    }
31508
private String genericTypeAsString(GenericsType genericsType) {
        StringBuilder ret = new StringBuilder(genericsType.getName());
        if (genericsType.getUpperBounds() != null) {
            ret.append(" extends ");
            for (int i = 0; i < genericsType.getUpperBounds().length; i++) {
                ClassNode classNode = genericsType.getUpperBounds()[i];
                if (classNode.equals(this)) {
                    ret.append(classNode.getName());
                } else {
                    ret.append(classNode.toString(false));
                }
                if (i + 1 < genericsType.getUpperBounds().length) ret.append(" & ");
            }
        } else if (genericsType.getLowerBound() !=null) {
            ClassNode classNode = genericsType.getLowerBound();
            if (classNode.equals(this)) {
                ret.append(" super ").append(classNode.getName());
            } else {
                ret.append(" super ").append(classNode);
            }
        }
        return ret.toString();
    }
58836
public @Nonnull
    ClassDescriptor getClassDescriptor(@SlashedClassName String className) {
        assert className.indexOf('.') == -1;
        ClassDescriptor classDescriptor = classDescriptorMap.get(className);
        if (classDescriptor == null) {
            if (MODULE_INFO.getClassName().equals(className)) {
                // don't allow module info to be added to the map,
                // which could be used to check referenced classes
                return MODULE_INFO;
            }
            classDescriptor = new ClassDescriptor(className);
            classDescriptorMap.put(className, classDescriptor);
        }
        return classDescriptor;
    }
548437
private ClassDescriptor getRealClassDescriptor(ClassDescriptor aCld, Object anObj)
    {
        ClassDescriptor result;

        if(aCld.getClassOfObject() == ProxyHelper.getRealClass(anObj))
        {
            result = aCld;
        }
        else
        {
            result = aCld.getRepository().getDescriptorFor(anObj.getClass());
        }

        return result;
    }
988964
public static <T> T find(Class<T> factoryClass, Descriptor descriptor) {
		Preconditions.checkNotNull(descriptor);
		return findInternal(factoryClass, descriptor.toProperties(), Optional.empty());
	}
697812
@SuppressWarnings({"unchecked"})
    public @Nonnull <T extends Describable<T>,D extends Descriptor<T>> DescriptorExtensionList<T,D> getDescriptorList(Class<T> type) {
        return descriptorLists.computeIfAbsent(type, key -> DescriptorExtensionList.createDescriptorList(this, key));
    }
9382
function descriptorOf(object, name) {
  const descriptor = Object.getOwnPropertyDescriptor(object, name);
  if (descriptor) {
    return descriptor;
  } else {
    const proto = prototypeOf(object);
    if (proto) {
      return descriptorOf(proto, name);
    } else {
      return null;
    }
  }
}
146558
protected SqlForClass getSqlForClass(ClassDescriptor cld)
    {
        SqlForClass result = (SqlForClass) sqlForClass.get(cld);
        if(result == null)
        {
            result = newInstanceSqlForClass();
            sqlForClass.put(cld, result);
        }
        return result;
    }
528691
private Object getGetDescriptorMethodCode() {
        StringBuilder code = new StringBuilder();

        String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());
        code.append("public ").append(descriptorClsName);
        code.append(" getDescriptor() throws IOException {").append(LINE_BREAK);
        code.append("if (this.descriptor != null) {").append(LINE_BREAK);
        code.append("return this.descriptor").append(JAVA_LINE_BREAK);
        code.append("}").append(LINE_BREAK);
        code.append(descriptorClsName).append(" descriptor = ");
        code.append("CodedConstant.getDescriptor(").append(ClassHelper.getInternalName(cls.getCanonicalName()))
                .append(JAVA_CLASS_FILE_SUFFIX).append(")").append(JAVA_LINE_BREAK);
        code.append("return (this.descriptor = descriptor)").append(JAVA_LINE_BREAK);
        code.append("}").append(LINE_BREAK);
        return code.toString();
    }
747710
private ClassDescriptor[] getMultiJoinedClassDescriptors(ClassDescriptor cld)
    {
        DescriptorRepository repository = cld.getRepository();
        Class[] multiJoinedClasses = repository.getSubClassesMultipleJoinedTables(cld, true);
        ClassDescriptor[] result = new ClassDescriptor[multiJoinedClasses.length];

        for (int i = 0 ; i < multiJoinedClasses.length; i++)
        {
            result[i] = repository.getDescriptorFor(multiJoinedClasses[i]);
         }

        return result;
    }
536218
public static String classDescriptor(Type type, Types types) {
    SigGen sig = new SigGen(types);
    sig.assembleClassSig(types.erasure(type));
    return sig.toString();
  }
918887
@CheckForNull
    public Descriptor getDescriptor(Class<? extends Describable> type) {
        for( Descriptor d : getExtensionList(Descriptor.class) )
            if(d.clazz==type)
                return d;
        return null;
    }
359536
protected ClassDescriptor selectClassDescriptor(Map row) throws PersistenceBrokerException
    {
        ClassDescriptor result = m_cld;
        Class ojbConcreteClass = (Class) row.get(OJB_CONCRETE_CLASS_KEY);
        if(ojbConcreteClass != null)
        {
            result = m_cld.getRepository().getDescriptorFor(ojbConcreteClass);
            // if we can't find class-descriptor for concrete class, something wrong with mapping
            if (result == null)
            {
                throw new PersistenceBrokerException("Can't find class-descriptor for ojbConcreteClass '"
                        + ojbConcreteClass + "', the main class was " + m_cld.getClassNameOfObject());
            }
        }
        return result;
    }
1028498
private OJBIterator getRsIteratorFromQuery(Query query, ClassDescriptor cld, RsIteratorFactory factory)
        throws PersistenceBrokerException
    {
        query.setFetchSize(1);
        if (query instanceof QueryBySQL)
        {
            if(logger.isDebugEnabled()) logger.debug("Creating SQL-RsIterator for class ["+cld.getClassNameOfObject()+"]");
            return factory.createRsIterator((QueryBySQL) query, cld, this);
        }

        if (!cld.isExtent() || !query.getWithExtents())
        {
            // no extents just use the plain vanilla RsIterator
            if(logger.isDebugEnabled()) logger.debug("Creating RsIterator for class ["+cld.getClassNameOfObject()+"]");

            return factory.createRsIterator(query, cld, this);
        }

        if(logger.isDebugEnabled()) logger.debug("Creating ChainingIterator for class ["+cld.getClassNameOfObject()+"]");

        ChainingIterator chainingIter = new ChainingIterator();

        // BRJ: add base class iterator
        if (!cld.isInterface())
        {
            if(logger.isDebugEnabled()) logger.debug("Adding RsIterator for class ["+cld.getClassNameOfObject()+"] to ChainingIterator");

            chainingIter.addIterator(factory.createRsIterator(query, cld, this));
        }

        Iterator extents = getDescriptorRepository().getAllConcreteSubclassDescriptors(cld).iterator();
        while (extents.hasNext())
        {
            ClassDescriptor extCld = (ClassDescriptor) extents.next();

            // read same table only once
            if (chainingIter.containsIteratorForTable(extCld.getFullTableName()))
            {
                if(logger.isDebugEnabled()) logger.debug("Skipping class ["+extCld.getClassNameOfObject()+"]");
            }
            else
            {
                if(logger.isDebugEnabled()) logger.debug("Adding RsIterator of class ["+extCld.getClassNameOfObject()+"] to ChainingIterator");

                // add the iterator to the chaining iterator.
                chainingIter.addIterator(factory.createRsIterator(query, extCld, this));
            }
        }

        return chainingIter;
    }
155437
def method_descriptor(descriptor: str) -> MethodDescriptor:
    
    end_para = descriptor.find(')')
    returns = descriptor[end_para + 1:]
    args = descriptor[1:end_para]

    return MethodDescriptor(
        parse_descriptor(returns)[0],
        parse_descriptor(args),
        returns,
        args,
        descriptor
    )