|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mockito.internal.util.Primitives
public class Primitives
Constructor Summary | |
---|---|
Primitives()
|
Method Summary | ||
---|---|---|
static
|
defaultValueForPrimitiveOrWrapper(java.lang.Class<T> primitiveOrWrapperType)
Returns the boxed default value for a primitive or a primitive wrapper. |
|
static boolean |
isPrimitiveOrWrapper(java.lang.Class<?> type)
Indicates if the given class is primitive type or a primitive wrapper. |
|
static
|
primitiveTypeOf(java.lang.Class<T> clazz)
Returns the primitive type of the given class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Primitives()
Method Detail |
---|
public static <T> java.lang.Class<T> primitiveTypeOf(java.lang.Class<T> clazz)
boolean.class
, Integer.class
in witch case this method will return boolean.class
, even SomeObject.class
in which case null
will be returned.
T
- The typeclazz
- The class from which primitive type has to be retrieved
null
public static boolean isPrimitiveOrWrapper(java.lang.Class<?> type)
type
- The type to check
true
if primitive or wrapper, false
otherwise.public static <T> T defaultValueForPrimitiveOrWrapper(java.lang.Class<T> primitiveOrWrapperType)
primitiveOrWrapperType
- The type to lookup the default value
null
if the type is neither a primitive nor a wrapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |