

def _link_classes(self, class_refs, ccount, progress_monitor):
    count = 0
    progress_monitor.start('Parsing classes', ccount)
    log = gl.LinkerLog(self, self.class_kind.kind)
    for scode_reference in class_refs:
        if self._reject_reference(scode_reference):
            progress_monitor.work('Skipped reference', 1)
            continue
        (simple, fqn) = je.get_class_name(scode_reference.content, (scode_reference.snippet is not None))
        case_insensitive = ((scode_reference.snippet == None) and (self.source != 'd'))
        if case_insensitive:
            exact = False
            exact_prefix = IEXACT
        else:
            exact = True
            exact_prefix = EXACT
        if (simple is not None):
            prefix = '{0}{1}{2}'.format(PREFIX_CLASS_LINKER, exact_prefix, cu.get_codebase_key(self.codebase))
            code_elements = []
            code_elements.extend(cu.get_value(prefix, simple, gl.get_type_code_elements, [simple, self.codebase, self.class_kind, exact]))
            prefix = '{0}{1}{2}'.format(PREFIX_ANNOTATION_LINKER, exact_prefix, cu.get_codebase_key(self.codebase))
            code_elements.extend(cu.get_value(prefix, simple, gl.get_type_code_elements, [simple, self.codebase, self.ann_kind, exact]))
            prefix = '{0}{1}{2}'.format(PREFIX_ENUMERATION_LINKER, exact_prefix, cu.get_codebase_key(self.codebase))
            code_elements.extend(cu.get_value(prefix, simple, gl.get_type_code_elements, [simple, self.codebase, self.enum_kind, exact]))
            (code_element, potentials) = self.get_code_element(scode_reference, code_elements, simple, fqn, log, (not exact))
            count += gl.save_link(scode_reference, code_element, potentials, self)
            if (not log.custom_filtered):
                reclassify_java(code_element, scode_reference)
        progress_monitor.work('Processed class', 1)
    log.close()
    progress_monitor.done()
    print('Associated {0} classes'.format(count))

dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/codebase/linker/java_linkers.py JavaClassLinker._link_classes/original