-
Enhancement
-
Resolution: Duplicate
-
P5
-
1.1.6, 1.3.0
-
generic
-
generic
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
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
- duplicates
-
JDK-4208836 Need a java.lang.Class.getWrapperType() method.
- Closed
-
JDK-4379804 There should be a way to get a primitive class from its name.
- Closed
-
JDK-6176992 (reflect) Add support to java.lang.Class for wrapper type conversions
- Open
- relates to
-
JDK-6361826 (reflect) provide method for mapping strings to class object for primitive types
- Resolved