}
Pair<EventType[], Set<EventType>> mapSuperTypes = getSuperTypesDepthFirst(optionalConfig != null ? optionalConfig.getSuperTypes() : null, false);
EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.OBJECTARR, eventTypeName, isPreconfiguredStatic, isPreconfigured, isConfigured, namedWindow, insertInto);
int typeId = eventTypeIdGenerator.getTypeId(eventTypeName);
ObjectArrayEventType newEventType = new ObjectArrayEventType(metadata, eventTypeName, typeId, this, propertyTypes, optionalConfig, mapSuperTypes.getFirst(), mapSuperTypes.getSecond());
EventType existingType = nameToTypeMap.get(eventTypeName);
if (existingType != null)
{
// The existing type must be the same as the type createdStatement
if (!newEventType.equalsCompareType(existingType))
{
String message = newEventType.getEqualsMessage(existingType);
throw new EventAdapterException("Event type named '" + eventTypeName +
"' has already been declared with differing column name or type information: " + message);
}
// Since it's the same, return the existing type