Details
-
Type:
Feature Request
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 3.0.0.Beta1
-
Component/s: Reflections
-
Labels:None
-
Estimated Difficulty:Low
Description
When dealing at the level of a Type, it would be helpful to have a method that would automatically convert the Type to a primitive wrapper if the original Type represents a primitive. This functionality is provided by the Primitives class in Guava.
Type type = Primitives.wrap(ip.getType());
At this point, we know that "type" does not represent a primitive.
http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/primitives/Primitives.html
We can port this from Weld easily enough.
I would call it Types.box() though.