private static void putToExtensionHolderMap(
            Class extensionSuperClass, Class extension, String extensionKey,
            ConcurrentHashMap<Class, AbstractExtensionHolder> extensionHolderConcurrentHashMap) {
        if (extensionSuperClass.isAssignableFrom(extension)) {
            AbstractExtensionHolder extensionHolder = extensionHolderConcurrentHashMap.get(extensionSuperClass);
            if (extensionHolder != null) {
                if (extensionHolder.getExtension(extensionKey) != null) {
                    log.error("Extension class " + extension.getName() + " not loaded, as there is already an" +
                            " matching extension '" + extensionKey + "' implemented as " + extensionHolder
                            .getExtension(extensionKey).getName());
                } else {
                    extensionHolder.addExtension(extensionKey, extension);
                }
            }
        }
    }
Adding extensions to Siddhi siddhiExtensionsHolderMap.

@param extensionSuperClass              extension super class (eg:Source)
@param extension                        extension class (eg:HttpSource)
@param extensionKey                     fully qualified extension name (namespace:extensionName)
@param extensionHolderConcurrentHashMap reference map for the Siddhi extension holder
modules/siddhi-core/src/main/java/io/siddhi/core/util/SiddhiExtensionLoader.java