   (e.g., IF_ICMPEQ) use a dash instead (e.g., if-icmpeq)."
   (:refer-clojure :exclude [compile pop])
   (:require [insn.util :as util])
-  (:import [java.lang.reflect Method]))
+  (:import [java.lang.reflect Field Method Modifier]))
 
 (defmulti ^:private -op
   "Return an op data map representing a op visitor fn to be called

  If the type is not provided, it will be determined through reflection.
  In this case, the class must be given as a string or Class object."
  ([v cls fname]
   (let [cls (if (class? cls)
               cls
               (Class/forName cls))
         f (.getField ^Class cls (name fname))]
     (&fn v cls fname (.getType f))))
  ([v cls fname ftype]
   (.visitFieldInsn v &op (util/class-desc cls)
                    (name fname) (util/type-desc ftype))))

                            cls
                            (Class/forName cls))
                      arity (long desc-or-arity)
                      static? (= Opcodes/INVOKESTATIC &op)
                      descs (for [^Method m (.getMethods ^Class cls)
                                  :when (and (= mname (.getName m))
                                             (= static?
                                                (Modifier/isStatic (.getModifiers m))))
                                  :let [desc (.getParameterTypes m)]
                                  :when (or (neg? arity)
                                            (== arity (count desc)))]
