jodd-core/src/main/java/jodd/bridge/ClassPathURLs.java
public static URL[] of(ClassLoader classLoader, Class clazz) {
		if (clazz == null) {
			clazz = ClassPathURLs.class;
		}
		if (classLoader == null) {
			classLoader = clazz.getClassLoader();
		}
		final Set<URL> urls = new LinkedHashSet<>();

		while (classLoader != null) {
			if (classLoader instanceof URLClassLoader) {
				final URLClassLoader urlClassLoader = (URLClassLoader) classLoader;
				return urlClassLoader.getURLs();
			}

			final URL url = classModuleUrl(classLoader, clazz);

			if (url != null) {
				urls.add(url);
			}

			classLoader = classLoader.getParent();
		}

		return urls.toArray(new URL[0]);
	}
public static URL[] of(ClassLoader classLoader, Class clazz) {
		if (clazz == null) {
			clazz = ClassPathURLs.class;
		}
		if (classLoader == null) {
			classLoader = clazz.getClassLoader();
		}
		final Set<URL> urls = new LinkedHashSet<>();

		while (classLoader != null) {
			if (classLoader instanceof URLClassLoader) {
				final URLClassLoader urlClassLoader = (URLClassLoader) classLoader;
				return urlClassLoader.getURLs();
			}

			final URL url = classModuleUrl(classLoader, clazz);

			if (url != null) {
				urls.add(url);
			}

			classLoader = classLoader.getParent();
		}

		return urls.toArray(new URL[0]);
	}
public static URL [ ] of ( ClassLoader classLoader , Class clazz ) { if ( clazz == null ) { clazz = ClassPathURLs . class ; } if ( classLoader == null ) { classLoader = clazz . getClassLoader ( ) ; } final Set < URL > urls = new LinkedHashSet <> ( ) ; while ( classLoader != null ) { if ( classLoader instanceof URLClassLoader ) { final URLClassLoader urlClassLoader = ( URLClassLoader ) classLoader ; return urlClassLoader . getURLs ( ) ; } final URL url = classModuleUrl ( classLoader , clazz ) ; if ( url != null ) { urls . add ( url ) ; } classLoader = classLoader . getParent ( ) ; } return urls . toArray ( new URL [ 0 ] ) ; }
Returns urls for the classloader

@param classLoader classloader in which to find urls
@return list of urls or {@code null} if not found
Returns urls for the classloader