langtools/src/share/classes/com/sun/tools/javac/code/Types.java
changeset 14057 b4b0377b8dba
parent 14048 308d1cf8fe46
child 14058 c7ec7facdd20
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Sat Sep 29 09:00:58 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Oct 04 13:04:53 2012 +0100
@@ -3154,6 +3154,14 @@
         }
         return Type.noType;
     }
+
+    /**
+     * Return the unboxed type if 't' is a boxed class, otherwise return 't' itself.
+     */
+    public Type unboxedTypeOrType(Type t) {
+        Type unboxedType = unboxedType(t);
+        return unboxedType.tag == NONE ? t : unboxedType;
+    }
     // </editor-fold>
 
     // <editor-fold defaultstate="collapsed" desc="Capture conversion">