< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java

Print this page

        

@@ -30,10 +30,11 @@
 import java.lang.annotation.*;
 import java.lang.reflect.Array;
 import java.lang.reflect.Method;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.stream.Collectors;
 import sun.reflect.annotation.*;
 
 import javax.lang.model.type.MirroredTypeException;
 import javax.lang.model.type.MirroredTypesException;
 import javax.lang.model.type.TypeMirror;

@@ -290,11 +291,11 @@
             type = t;
             typeString = t.toString();
         }
 
         public String toString() {
-            return typeString;
+            return typeString + ".class";
         }
 
         public int hashCode() {
             return (type != null ? type : typeString).hashCode();
         }

@@ -333,11 +334,13 @@
             types = ts;
             typeStrings = ts.toString();
         }
 
         public String toString() {
-            return typeStrings;
+            return types.stream()
+                .map(t -> t.toString() + ".class")
+                .collect(Collectors.joining(", ", "{", "}"));
         }
 
         public int hashCode() {
             return (types != null ? types : typeStrings).hashCode();
         }
< prev index next >