JDK-4207220 : Add getPrimitiveClass() and getWrapperClass() methods to java.lang.Class.
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 1.1.6,1.3.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-01-29
  • Updated: 2012-09-28
  • Resolved: 2005-12-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6Resolved
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Name: dbT83986			Date: 01/29/99


Request for Enhancement:

  Add two new methods to the class java.lang.Class:

  public Class getWrapperClass();
    For primitive classes, returns the associated
    wrapper class.  For example, for int.class,
    this would return Integer.class.  For other
    classes, throws a ClassNotFoundException.

  public Class getPrimitiveClass();
    For wrapper classes, returns the associated
    primitive class.  For example, for Integer.class,
    this would return int.class.  For other classes,
    throws a ClassNotFoundException.

======================================================================
###@###.### 10/28/04 00:59 GMT

Comments
EVALUATION Closing as duplicate of functionality requested in 6176992.
12-12-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
14-06-2004

EVALUATION Could be useful, but hardly necessary. The workaround is easy. william.maddox@Eng 1999-02-11 It is reasonable to ask for a mapping from strings ("int", "float") to corresponding Class objects. Will consider for Tiger. ###@###.### 2002-05-14 Not critical for Tiger; will reconsider in the future. ###@###.### 2003-10-21
14-05-2002