public class BoxedWrapper extends Object
| Constructor and Description |
|---|
BoxedWrapper() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
getBoxedFromPrimitiveType(Class<?> primitiveType)
Get the wrapped counter part from a primitive type.
|
static boolean |
hasBoxedCounterPart(Class<?> type)
Returns
true if type has a primitive
counter-part. |
public static Class<?> getBoxedFromPrimitiveType(Class<?> primitiveType)
getBoxedFromPrimitiveType(int.class) will return
Integer.class.
primitiveType - The primitive type to convert to its wrapper counter part.null if the class did
not have a boxed counter part.public static boolean hasBoxedCounterPart(Class<?> type)
true if type has a primitive
counter-part. E.g. if type if Integer then this
method will return true.type - The type to check whether or not it has a primitive
counter-part.true if this type has a primitive counter-part.Copyright © 2007–2016. All rights reserved.