class ClasspathHelper {

    static Set<String> fullClasspathFor( ClassLoader classLoader )
    {
        Set<String> result = new LinkedHashSet<>();

        result.addAll( javaClasspath() );

        ClassLoader loader = classLoader;
        while ( loader != null )
        {
            if ( loader instanceof URLClassLoader )
            {
                for ( URL url : ((URLClassLoader) loader).getURLs() )
                {
                    result.add( canonicalPath( url ) );
                }
            }
            loader = loader.getParent();
        }

        return result;
    }

    private  ClasspathHelper();

}