JDK-4208836 : Need a java.lang.Class.getWrapperType() method.
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 1.1.6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-02-04
  • Updated: 2012-09-28
  • Resolved: 1999-02-12
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 02/04/99


Suppose you have a primitive type like boolean.class
and you want to get the wrapper class Boolean.
But all you know is that it is some primitive
class, not which one. 

(Review ID: 40629)
======================================================================

Comments
WORK AROUND Name: dbT83986 Date: 02/04/99 All I've thought of is a long list of if's saying if(c.getName().equals(boolean.class.getName()) { return Boolean.class; } ======================================================================
11-06-2004