|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.virtualmock.util.PrimitiveUtils
Provides utilities for working with primitives. The getDefaultPrimitiveValue() method generates default return values for primitives. The getPrimitiveTypeForWrapperClass method converts a primitive wrapper class (such as Integer.class) into a primitive class (such as int.class).
| Constructor Summary | |
PrimitiveUtils()
|
|
| Method Summary | |
java.lang.Object |
getDefaultPrimitiveValue(java.lang.Class type)
Generate default return values for specified primitive type. |
java.lang.Class |
getPrimitiveTypeForWrapperClass(java.lang.Class primitiveWrapperType)
When passed a primitive wrapper type (such as Integer.class), returns the corresponding primitive type (such as int.class). |
boolean |
isAssignableToPrimitiveWrapper(java.lang.Class type)
Returns true if the specified type is assignable to any primitive type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PrimitiveUtils()
| Method Detail |
public boolean isAssignableToPrimitiveWrapper(java.lang.Class type)
type - the type to check for assignability to a primitive type
public java.lang.Object getDefaultPrimitiveValue(java.lang.Class type)
type - a Class object representing a primitive
java.lang.IllegalArgumentException - if the type is not a primitivepublic java.lang.Class getPrimitiveTypeForWrapperClass(java.lang.Class primitiveWrapperType)
primitiveWrapperType - The primitive wrapper class to convert to a
primitive class
java.lang.IllegalArgumentException - if the specified type is not one of the
eight primitive wrapper types
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||