private void addExtensions(Bundle bundle) {
            ClassLoader classLoader = bundle.adapt(BundleWiring.class).getClassLoader();
            Iterable<Class<?>> extensions = ClassIndex.getAnnotated(Extension.class, classLoader);
            for (Class extension : extensions) {
                addExtensionToMap(extension, siddhiExtensionsMap,
                        extensionHolderConcurrentHashMap, deprecatedSiddhiExtensionsMap);
                bundleExtensions.put(extension, (int) bundle.getBundleId());
            }
        }
Class to listen to Bundle changes to update available extensions.
modules/siddhi-core/src/main/java/io/siddhi/core/util/SiddhiExtensionLoader.java