public BeanEventType GetCreateBeanType(Type clazz, bool publicFields)
        {
            var existing = types.Get(clazz);
            if (existing != null) {
                return existing;
            }

            // check-allocate bean-stem
            ConfigurationCommonEventTypeBean config = null;
            if (publicFields) {
                config = new ConfigurationCommonEventTypeBean();
                config.AccessorStyle = AccessorStyle.PUBLIC;
            }

            var stem = stemFactory.GetCreateStem(clazz, config);
            // metadata
            var metadata = new EventTypeMetadata(
                clazz.FullName,
                null,
                EventTypeTypeClass.BEAN_INCIDENTAL,
                EventTypeApplicationType.CLASS,
                NameAccessModifier.TRANSIENT,
                EventTypeBusModifier.NONBUS,
                false,
                ComputeTypeId(clazz.Name));

            // supertypes
            var superTypes = GetSuperTypes(stem.SuperTypes);
            var deepSuperTypes = GetDeepSupertypes(stem.DeepSuperTypes);

            // bean type
            var eventType = EventTypeFactory.CreateBeanType(
                stem,
                metadata,
                this,
                superTypes,
                deepSuperTypes,
                null,
                null);

            types.Put(clazz, eventType);
            return eventType;
        }
 public void RegisterBean(
     EventTypeMetadata metadata,
     Type clazz,
     string startTimestampName,
     string endTimestampName,
     EventType[] superTypes,
     ISet<EventType> deepSuperTypes)
 {
     var stem = _beanEventTypeStemService.GetCreateStem(clazz, null);
     var eventType = _eventTypeFactory.CreateBeanType(
         stem,
         metadata,
         _beanEventTypeFactory,
         superTypes,
         deepSuperTypes,
         startTimestampName,
         endTimestampName);
     HandleRegister(eventType);
 }