Returning genericDeclaration for TypeVariableImpl's getGenericDeclaration method.
authorrtrimana <rtrimana@uci.edu>
Fri, 21 Jun 2019 18:43:20 +0000 (11:43 -0700)
committerrtrimana <rtrimana@uci.edu>
Fri, 21 Jun 2019 18:43:20 +0000 (11:43 -0700)
examples/Empty.groovy
src/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java

index 55d02fe..1b7beeb 100644 (file)
@@ -23,6 +23,6 @@ class Empty {
                //Empty emp = new Empty();
                //int result = emp.installed();
                //println result;
-               //println "Test"
+               println "Test"
        }       
 }
index 7abc7e3..56a544f 100644 (file)
@@ -60,18 +60,18 @@ public class TypeVariableImpl<D extends GenericDeclaration>
     }
 
     public native Type[] getBounds();
-    /*public Type[] getBounds() {
-
-        throw new UnsupportedOperationException();
-    }*/
 
     public D getGenericDeclaration(){
-        throw new UnsupportedOperationException();
+        return genericDeclaration;
     }
 
-    public String getName()   { return name; }
+    public String getName()   {
+        return name;
+    }
 
-    public String toString() {return getName();}
+    public String toString() {
+        return getName();
+    }
 
     @Override
     public boolean equals(Object o) {