<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,7 @@
     (japa.parser.ast.type WildcardType ReferenceType ClassOrInterfaceType)
     (japa.parser.ast.expr MemberValuePair StringLiteralExpr NormalAnnotationExpr NameExpr ClassExpr ArrayInitializerExpr ArrayCreationExpr FieldAccessExpr ObjectCreationExpr MethodCallExpr VariableDeclarationExpr CastExpr FieldAccessExpr )
    (japa.parser.ast.body VariableDeclarator VariableDeclaratorId Parameter)
+    (java.util LinkedList)
   )
 )
 
@@ -20,8 +21,14 @@
 (defn st-literal [value]
    (StringLiteralExpr. value))
 
-(defn ctype [name &amp; types]
-  (doto (ClassOrInterfaceType.) (.setName name) (.setTypeArgs types)))
+(defn ctype 
+  ([name] (doto (ClassOrInterfaceType.) (.setName name)))
+  ([name &amp; types] (let [linked-types (LinkedList. types)]
+                    (doto (ctype name) (.setTypeArgs linked-types)))))
+
+(defmulti ref-type (fn [name|type] (string? name|type)))
+(defmethod ref-type true [name]  (ref-type (ctype name)))
+(defmethod ref-type false [type]  (ReferenceType. type))
 
 (defn nexp [value]
   (NameExpr. value))</diff>
      <filename>source-mining/src/com/jdftm/ast_composition.clj</filename>
    </modified>
    <modified>
      <diff>@@ -17,12 +17,12 @@
 (defmethod not-resolvable :default [root] (identity false))
 (defmethod not-resolvable ReferenceType [root] (or (not-resolvable (.. root getType getTypeArgs)) 
                                                    (is-type-arg (.. root getType getName))))
- (defn has-gen-meta [exp]
+(defn has-gen-meta [exp]
   (contains? (bean (.. exp (getType) (getType))) :typeArgs)) 
 
 (defn get-meta [exp]
   (if (has-gen-meta exp) 
-    (.. exp (getType) (getType) (getTypeArgs)) (identity nil)))
+    (.. exp (getType) (getType) (getTypeArgs))))
 
 (defn process-types [exp]
   (domonad maybe-m  </diff>
      <filename>source-mining/src/com/jdftm/generics_meta.clj</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,24 @@
 (ns com.jdftm.proxy-exp-test
- (:use com.jdftm.ast-composition)
- (:use com.jdftm.ast.proxy-ast)
- (:use clojure.contrib.test-is))   
+ (:use com.jdftm.ast-composition com.jdftm.ast.proxy-ast  
+       com.jdftm.generics-meta clojure.contrib.test-is)
+ (:import 
+    (japa.parser.ast.expr VariableDeclarationExpr)
+    (japa.parser.ast.body Parameter)
+    (japa.parser.ast.type ReferenceType)
+ )
+
+)   
 
 (deftest proxy-creation-exp 
   (let [obj-cexp (obj-cexp (ctype &quot;ArrayList&quot; (ctype &quot;Integer&quot;))) 
         proxy-call (proxy-call obj-cexp &quot;(Integer ())&quot; &quot;com.jdftm.gene.meta.MetaProxy.newInstance&quot;)
         proxy-dec (proxy-dec (var-dec-id &quot;list&quot;) (ctype &quot;List&quot;) proxy-call)]
         (is (= &quot;list = (List) com.jdftm.gene.meta.MetaProxy.newInstance(new ArrayList&lt;Integer&gt;(), \&quot;(Integer ())\&quot;, new Class [] {  })&quot; (str proxy-dec)))))
+
+(deftest types-tree
+  (let [int-list (ref-type (ctype &quot;List&quot; (ref-type &quot;Integer&quot;))) 
+        list-to-obj (ref-type (ctype &quot;Map&quot; int-list (ref-type &quot;Object&quot;))) 
+        param (Parameter. list-to-obj (var-dec-id &quot;map&quot;))
+        expected '((&quot;List&quot; ((&quot;Integer&quot; ()))) (&quot;Object&quot; ()))]
+        (is (= (build-types-tree (get-meta param)) expected))))
+</diff>
      <filename>source-mining/test/com/jdftm/proxy_exp_test.clj</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>56b6fc08ec541357ebb48420f67ce734ea42df89</id>
    </parent>
  </parents>
  <author>
    <name>Ronen Narkis</name>
    <email>narkisr@gmail.com</email>
  </author>
  <url>http://github.com/narkisr/genericsfaction/commit/de677bdf7bc95ac4ea47df4e1e92efe4c2c71372</url>
  <id>de677bdf7bc95ac4ea47df4e1e92efe4c2c71372</id>
  <committed-date>2009-07-04T07:46:42-07:00</committed-date>
  <authored-date>2009-07-04T07:46:42-07:00</authored-date>
  <message>added types tree testing</message>
  <tree>e36e256f303c7d20a563abca0729ee4310bb2b17</tree>
  <committer>
    <name>Ronen Narkis</name>
    <email>narkisr@gmail.com</email>
  </committer>
</commit>
