

def _link_enum_values(self, enum_refs, ecount, progress_monitor):
    count = 0
    progress_monitor.start('Parsing enumeration values', ecount)
    log = gl.LinkerLog(self, self.enum_value_kind.kind)
    for scode_reference in enum_refs:
        if self._reject_reference(scode_reference):
            progress_monitor.work('Skipped reference', 1)
            continue
        (field_name, fqn_container) = self._get_field_name(scode_reference)
        code_elements = self._get_field_elements(field_name, PREFIX_ENUM_VAL_LINKER, self.enum_value_kind)
        (code_element, potentials) = self.get_code_element(scode_reference, code_elements, field_name, fqn_container, log)
        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 enum value', 1)
    log.close()
    progress_monitor.done()
    print('Associated {0} enum values'.format(count))

dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/codebase/linker/java_linkers.py JavaFieldLinker._link_enum_values/original