src/share/classes/javax/lang/model/type/MirroredTypesException.java

Print this page

        

@@ -47,11 +47,21 @@
  */
 public class MirroredTypesException extends RuntimeException {
 
     private static final long serialVersionUID = 269;
 
-    private transient List<? extends TypeMirror> types; // cannot be serialized
+    transient List<? extends TypeMirror> types; // cannot be serialized
+
+    /*
+     * Trusted constructor to be called by MirroredTypeException.
+     */
+    MirroredTypesException(String message, TypeMirror type) {
+        super(message);
+        List<TypeMirror> tmp = (new ArrayList<TypeMirror>());
+        tmp.add(type);
+        types = Collections.unmodifiableList(tmp);
+    }
 
     /**
      * Constructs a new MirroredTypesException for the specified types.
      *
      * @param types  the types being accessed