code: private void process() {
      Entity entity = entityClass.getAnnotation(Entity.class);
      ProjectedEntity projectedEntity = entityClass.getAnnotation(ProjectedEntity.class);
      if (entity != null) {
        initEntityMetadata(entity);
      } else if (projectedEntity != null) {
        initEntityMetadata(projectedEntity);
      } else {
        String message = String.format("Class %s must either have %s or %s annotation",
            entityClass.getName(), Entity.class.getName(), ProjectedEntity.class.getName());
        throw new EntityManagerException(message);
      }
  
      processPropertyOverrides();
  
      processFields();
      // If we did not find valid Identifier...
      if (entityMetadata.getIdentifierMetadata() == null) {
        throw new EntityManagerException(
            String.format("Class %s requires a field with annotation of %s", entityClass.getName(),
                Identifier.class.getName()));
      }
      entityMetadata.setEntityListenersMetadata(EntityListenersIntrospector.introspect(entityClass));
      entityMetadata.ensureUniqueProperties();
      entityMetadata.cleanup();
    }
docs: Processes the entity class using reflection and builds the metadata.