 If no ClassLoader is provided, RT/baseLoader is assumed."
   ([] (all-classpath-urls (clojure.lang.RT/baseLoader)))
   ([cl]
-     (->> (iterate #(.getParent %) cl)
+     (->> (iterate #(.getParent ^ClassLoader %) cl)
        (take-while identity)
        reverse
-       (filter (partial instance? java.net.URLClassLoader))
-       (mapcat #(.getURLs %))
+       (filter (partial instance? URLClassLoader))
+       (mapcat #(.getURLs ^URLClassLoader %))
        distinct)))
 
+(defn ^ZipFile zip-file [jar-path]
+  (cond
+    (instance? File jar-path) (ZipFile. ^File jar-path)
+    (string? jar-path) (ZipFile. ^String jar-path)
+    :else
+    (throw
+      (IllegalArgumentException. (str "Cannot construct zipfile from " jar-path)))))
+
 (defn jar-entry-names* [jar-path]
-  (with-open [z (java.util.zip.ZipFile. jar-path)]
-    (doall (map #(.getName %) (enumeration-seq (.entries z))))))
+  (with-open [z (zip-file jar-path)]
+    (doall (map #(.getName ^ZipEntry %) (enumeration-seq (.entries ^ZipFile z))))))
 
 (def jar-entry-names (memoize jar-entry-names*))
 

  (first
    (filter
      (fn [res]
        (re-find #"(\/google-closure-library-0.0*|\/google-closure-library\/)" (.getPath res)))
      (enumeration-seq (.getResources (.getContextClassLoader (Thread/currentThread)) path)))))

(defn goog-dependencies*

(ns cljs.js-deps
  (:require [clojure.java.io :as io]
            [clojure.string :as string])
  (:import java.io.File
           java.net.URL
           java.net.URLClassLoader
           java.util.zip.ZipFile
           java.util.zip.ZipEntry))

; taken from pomegranate/dynapath
; https://github.com/tobias/dynapath/blob/master/src/dynapath/util.clj
