   (def metamodel (start-server "Server0"))
   (start-client "Server0")
 
-  (import org.dada.asm.ClassFactory)
-  (import org.dada.core.VersionedModelView)
-  (import org.dada.core.GetterMetadata)
- 
   (def factory (new ClassFactory))
   (def properties (list [(Integer/TYPE) "id"] [(Integer/TYPE) "version"] [(Long/TYPE) "time"] [(Double/TYPE) "amount"]))
-  (def input-class (apply make-class factory "org.dada.tmp.InputItem" properties))
+  (def input-class (apply make-class factory "org.dada.tmp.InputItem" Object properties))
   (def input-types (map (fn [property] (nth property 0)) properties))
   (def input-names (map (fn [property] (nth property 1)) properties))
   (def input-getters (map (fn [property] (make-proxy-getter input-class (nth property 0) (nth property 1))) properties))

(import org.dada.core.Update)
(import org.dada.core.Model)
(import org.dada.core.View)
(import org.dada.demo.Client)
(import org.springframework.context.support.ClassPathXmlApplicationContext)

(defn start-server [#^String name]
  (System/setProperty "server.name" name)
  (let [context (ClassPathXmlApplicationContext. "application-context.xml")]

    #(Update. % nil)
    (.getData model))))

;; e.g.
;;(make-class
;; factory
;; "org.dada.tmp.Amount"
;; ["int" "id"] ["int" "version"] ["double" "amount"])
(defn make-class [factory name superclass & properties]
  (. #^DynamicClassLoader
     (deref clojure.lang.Compiler/LOADER)
     (defineClass name 
       (.create 
	factory
	name
	(. superclass getCanonicalName)
	(if (empty? properties)
	  nil
	  (into-array (map (fn [pair] 
			       (let [array (make-array String 2)]
				 (aset array 0 (.getCanonicalName (first pair)))
				 (aset array 1 (first (rest pair)))
				 array))
			   properties)))))))

;; fields => [model field]


(defn make-constructor [class & types]
  (let [ctor (symbol (str (.getCanonicalName class) "."))]
