Class BoxedWrapper
java.lang.Object
org.powermock.reflect.internal.primitivesupport.BoxedWrapper
The purpose of the Primitive Wrapper is to provide methods that deals with
translating wrapper types to its related primitive type.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> getBoxedFromPrimitiveType(Class<?> primitiveType) Get the wrapped counter part from a primitive type.static booleanhasBoxedCounterPart(Class<?> type) Returnstrueiftypehas a primitive counter-part.
-
Field Details
-
boxedWrapper
-
-
Constructor Details
-
BoxedWrapper
public BoxedWrapper()
-
-
Method Details
-
getBoxedFromPrimitiveType
Get the wrapped counter part from a primitive type. For example:getBoxedFromPrimitiveType(int.class)will returnInteger.class.- Parameters:
primitiveType- The primitive type to convert to its wrapper counter part.- Returns:
- The boxed counter part or
nullif the class did not have a boxed counter part.
-
hasBoxedCounterPart
Returnstrueiftypehas a primitive counter-part. E.g. iftypeifIntegerthen this method will returntrue.- Parameters:
type- The type to check whether or not it has a primitive counter-part.- Returns:
trueif this type has a primitive counter-part.
-