Discovers interesting (that we care about) things about the class.
763460
protected void discover(final Mapper mapper) {
        for (final Class<? extends Annotation> c : INTERESTING_ANNOTATIONS) {
            addAnnotation(c);
        }

        Class<?> superclass = clazz.getSuperclass();
        if (superclass != null && !superclass.equals(Object.class)) {
            superClass = mapper.getMappedClass(superclass);
        }
        for (Class<?> aClass : clazz.getInterfaces()) {
            interfaces.add(mapper.getMappedClass(aClass));
        }

        final List<Class<?>> lifecycleClasses = new ArrayList<Class<?>>();
        lifecycleClasses.add(clazz);

        final EntityListeners entityLisAnn = (EntityListeners) getAnnotation(EntityListeners.class);
        if (entityLisAnn != null && entityLisAnn.value().length != 0) {
            Collections.addAll(lifecycleClasses, entityLisAnn.value());
        }

        for (final Class<?> cls : lifecycleClasses) {
            for (final Method m : ReflectionUtils.getDeclaredAndInheritedMethods(cls)) {
                for (final Class<? extends Annotation> c : LIFECYCLE_ANNOTATIONS) {
                    if (m.isAnnotationPresent(c)) {
                        addLifecycleEventMethod(c, m, cls.equals(clazz) ? null : cls);
                    }
                }
            }
        }

        update();

        for (final java.lang.reflect.Field field : ReflectionUtils.getDeclaredAndInheritedFields(clazz, true)) {
            field.setAccessible(true);
            final int fieldMods = field.getModifiers();
            if (!isIgnorable(field, fieldMods, mapper)) {
                if (field.isAnnotationPresent(Id.class)) {
                    persistenceFields.add(new MappedField(field, clazz, mapper));
                    update();
                } else if (field.isAnnotationPresent(Property.class)
                           || field.isAnnotationPresent(Reference.class)
                           || field.isAnnotationPresent(Embedded.class)
                           || field.isAnnotationPresent(Serialized.class)
                           || isSupportedType(field.getType())
                           || ReflectionUtils.implementsInterface(field.getType(), Serializable.class)) {
                    persistenceFields.add(new MappedField(field, clazz, mapper));
                } else {
                    if (mapper.getOptions().getDefaultMapper() != null) {
                        persistenceFields.add(new MappedField(field, clazz, mapper));
                    } else if (LOG.isWarnEnabled()) {
                        LOG.warn(format("Ignoring (will not persist) field: %s.%s [type:%s]", clazz.getName(), field.getName(),
                                           field.getType().getName()));
                    }
                }
            }
        }
    }
221984
def get_ancestor_class_names(mention):
    
    span = _to_span(mention)
    class_names = []
    i = _get_node(span.sentence)
    while i is not None:
        class_names.insert(0, str(i.get("class")))
        i = i.getparent()
    return class_names
909024
public static OClass probeOClass(Iterable<ODocument> it, int probeLimit) {
		return probeOClass(it.iterator(), probeLimit);
	}
450733
private Interest discover(BackoffRetryClient client, On<Long> onFound, On<Void> onComplete, On<Exception> onError) throws IOException {
    Interest interest = new Interest(topicPrefix);
    interest.setInterestLifetimeMilliseconds(STARTING_DISCOVERY_LIFETIME);
    interest.setExclude(excludeKnownPublishers());
    client.retry(face, interest, (interest1, data) -> {
      if (stopped) {
        return;
      }

      LOGGER.log(Level.INFO, "Received discovery data ({0} bytes): {1}", new Object[]{data.getContent().size(), data.getName()});
      found(data.getName(), onFound, onError);

      // TODO instead of inspecting name should look at content and examine for multiple publishers
      try {
        discover(client, onFound, onComplete, onError); // recursion
      } catch (IOException e) {
        LOGGER.log(Level.SEVERE, "Failed while discovering publishers, aborting: {0}", new Object[]{broadcastPrefix, e});
        onError.on(e);
        // TODO re-call discover here?
      }
    }, interest2 -> {
      // TODO recall client here, we should never be done
    });
    return interest;
  }
570335
def find_class_files(self):
        
        files = self._find_files()
        self.announce(
            "found '{}' compiled class files in '{}'".format(
                len(files), self.root
            )
        )
        return files
112476
def parse_definition(self, class_):
        """"""
        start = self.line
        self.consume(tk.NAME)
        name = self.current.value
        self.log.debug("parsing %s '%s'", class_.__name__, name)
        self.stream.move()
        if self.current.kind == tk.OP and self.current.value == '(':
            parenthesis_level = 0
            while True:
                if self.current.kind == tk.OP:
                    if self.current.value == '(':
                        parenthesis_level += 1
                    elif self.current.value == ')':
                        parenthesis_level -= 1
                        if parenthesis_level == 0:
                            break
                self.stream.move()
        if self.current.kind != tk.OP or self.current.value != ':':
            self.leapfrog(tk.OP, value=":")
        else:
            self.consume(tk.OP)
        if self.current.kind in (tk.NEWLINE, tk.COMMENT):
            skipped_error_codes = self.parse_skip_comment()
            self.leapfrog(tk.INDENT)
            assert self.current.kind != tk.INDENT
            docstring = self.parse_docstring()
            decorators = self._accumulated_decorators
            self.log.debug("current accumulated decorators: %s", decorators)
            self._accumulated_decorators = []
            self.log.debug("parsing nested definitions.")
            children = list(self.parse_definitions(class_))
            self.log.debug("finished parsing nested definitions for '%s'",
                           name)
            end = self.line - 1
        else:  # one-liner definition
            skipped_error_codes = ''
            docstring = self.parse_docstring()
            decorators = []  # TODO
            children = []
            end = self.line
            self.leapfrog(tk.NEWLINE)
        definition = class_(name, self.source, start, end,
                            decorators, docstring, children, None,
                            skipped_error_codes)
        for child in definition.children:
            child.parent = definition
        self.log.debug("finished parsing %s '%s'. Next token is %r",
                       class_.__name__, name, self.current)
        return definition
930827
function( cls ) {
				var classes = this.getCustomData( 'classes' );
				if ( !this.hasClass( cls ) ) {
					!classes && ( classes = [] ), classes.push( cls );
					this.setCustomData( 'classes', classes );
					this.addClass( cls );
				}
			}
1005757
def description(cls):
        """"""
        lines = [s.strip() for s in cls.__doc__.splitlines()]
        note_i = lines.index("Notes")
        return "\n".join(lines[note_i + 2:])
851969
def _find_class(self, class_name):
        ""
        classes = {}
        classes.update(globals())
        classes.update(self.INSTANCE_CLASSES)
        logger.debug(f'looking up class: {class_name}')
        cls = classes[class_name]
        logger.debug(f'found class: {cls}')
        return cls
455989
def class_in_progress(stack=None):
    """"""
    if stack is None:
        stack = inspect.stack()
    for frame in stack:
        statement_list = frame[4]
        if statement_list is None:
            continue
        if statement_list[0].strip().startswith('class '):
            return True
    return False
1292784
def find_all(self, cls):
        """"""
        final_results = []
        table = self.get_class_table(cls)
        for db_result in table.scan():
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
528113
def superclasses_bug_fix(data):
    '''  '''
    for i, value in enumerate(data['superclasses']):
        data['superclasses'][i]['superclass_tid'] = data['superclasses'][i].pop('id')
    return data
489669
private function discoverNotifiables()
    {
        /** @var ClassMetadata[] $entities */
        $entities = $this->em->getMetadataFactory()->getAllMetadata();
        foreach ($entities as $entity) {
            $class = $entity->name;
            $annotation = $this->annotationReader->getClassAnnotation(new \ReflectionClass($class), 'Mgilet\NotificationBundle\Annotation\Notifiable');
            if ($annotation) {
                $this->notifiables[$annotation->getName()] = [
                    'class' => $entity->name,
                    'annotation' => $annotation,
                    'identifiers' => $entity->getIdentifier()
                ];
            }
        }
    }
969393
private ClassDescriptor getItemClassDescriptor(ObjectReferenceDescriptor ord, List hintClasses)
    {   
        DescriptorRepository repo = ord.getClassDescriptor().getRepository();

        if (hintClasses == null || hintClasses.isEmpty())
        {
            return repo.getDescriptorFor(ord.getItemClass()); 
        }
        
        Class resultClass = (Class) hintClasses.get(0);
        
        for (Iterator iter = hintClasses.iterator(); iter.hasNext();)
        {
            Class clazz = (Class) iter.next();
            Class superClazz = clazz.getSuperclass();

            if (superClazz != null && resultClass.equals(superClazz.getSuperclass()))
            {
                continue; // skip if we already have a super superclass 
            }
           
            if (hintClasses.contains(superClazz))
            {
                resultClass = superClazz;   // use superclass if it's in the hints
            }
        }

        return repo.getDescriptorFor(resultClass);
    }
246334
def about(self):
        
        aboutDialog = AboutDialog(parent=self)
        aboutDialog.show()
        aboutDialog.addDependencyInfo()
901699
def classes(self):
        
        p = lambda o: isinstance(o, Class) and self._docfilter(o)
        return sorted(filter(p, self.doc.values()))
704912
@Override
    public void visitInnerClasses(InnerClasses obj) {
        super.visitInnerClasses(obj);
        InnerClass[] inner_classes = obj.getInnerClasses();
        for (InnerClass inner_class : inner_classes) {
            inner_class.accept(this);
        }
    }