|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.powermock.reflect.internal.primitivesupport.PrimitiveWrapper
public class PrimitiveWrapper
The purpose of the Primitive Wrapper is to provide methods that deals with translating wrapper types to its related primitive type.
Constructor Summary | |
---|---|
PrimitiveWrapper()
|
Method Summary | |
---|---|
static Class<?> |
getPrimitiveFromWrapperType(Class<?> wrapperType)
Get the primitive counter part from a wrapped type. |
static boolean |
hasPrimitiveCounterPart(Class<?> type)
Returns true if type has a primitive
counter-part. |
static Class<?>[] |
toPrimitiveType(Class<?>[] types)
Convert all wrapper types in types to their primitive
counter parts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrimitiveWrapper()
Method Detail |
---|
public static Class<?>[] toPrimitiveType(Class<?>[] types)
types
to their primitive
counter parts.
types
- The array of types that should be converted.
public static Class<?> getPrimitiveFromWrapperType(Class<?> wrapperType)
getPrimitiveFromWrapperType(Integer.class)
will return
int.class
.
wrapperType
- The wrapper type to convert to its primitive counter part.
null
if the class did
not have a primitive counter part.public static boolean hasPrimitiveCounterPart(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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |