private static void addExtensionMetaFromClassFiles(File targetDirectory, List<String> runtimeClasspathElements,
                                                       Log logger, boolean includeOrigin,
                                                       List<NamespaceMetaData> namespaceMetaDataList)
            throws MojoFailureException, MalformedURLException {

        int urlCount = runtimeClasspathElements.size() + 1;     // +1 to include the module's target/classes folder

        // Creating a list of URLs with all project dependencies
        URL[] urls = new URL[urlCount];
        for (int i = 0; i < runtimeClasspathElements.size(); i++) {
            try {
                urls[i] = new File(runtimeClasspathElements.get(i)).toURI().toURL();
            } catch (MalformedURLException e) {
                throw new MojoFailureException("Unable to access project dependency: "
                        + runtimeClasspathElements.get(i), e);
            }
        }

        // Adding the generated classes to the class loader
        urls[urlCount - 1] = targetDirectory.toURI().toURL();
        ClassLoader urlClassLoader = AccessController.doPrivileged(
                (PrivilegedAction<ClassLoader>) () -> new URLClassLoader(
                        urls, Thread.currentThread().getContextClassLoader()
                )
        );
        // Getting extensions from all the class files in the classes directory
        addExtensionInDirectory(targetDirectory, targetDirectory.getAbsolutePath(), urlClassLoader,
                namespaceMetaDataList, logger, includeOrigin);
    }
Returns the extension extension meta data
Gets the meta data from the siddhi manager

@param targetDirectoryPath The path of the target directory of the maven module containing extensions
@param logger              The maven plugin logger
@param includeOrigin
@param loadFromAllJars
@return NamespaceMetaData namespace meta data list
@throws MojoFailureException   If this fails to access project dependencies
@throws MojoExecutionException If the classes directory from which classes are loaded is invalid
modules/siddhi-doc-gen/src/main/java/io/siddhi/doc/gen/core/utils/DocumentationUtils.java