Package com.twelvemonkeys.lang
Class ReflectUtil
- java.lang.Object
-
- com.twelvemonkeys.lang.ReflectUtil
-
public final class ReflectUtil extends java.lang.ObjectUtil class for various reflection-based operations.NOTE: This class is not considered part of the public API and may be changed without notice
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/lang/ReflectUtil.java#1 $
-
-
Constructor Summary
Constructors Modifier Constructor Description privateReflectUtil()Don't allow instances
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisPrimitiveWrapper(java.lang.Class pType)Returnstrueif the given type is a primitive wrapper.static java.lang.ClassunwrapType(java.lang.Class pType)Returns the primitive type for the given wrapper type.static java.lang.ClasswrapType(java.lang.Class pType)Returns the wrapper type for the given primitive type.
-
-
-
Method Detail
-
unwrapType
public static java.lang.Class unwrapType(java.lang.Class pType)
Returns the primitive type for the given wrapper type.- Parameters:
pType- the wrapper type- Returns:
- the primitive type
- Throws:
java.lang.IllegalArgumentException- ifpTypeis not a primitive wrapper
-
wrapType
public static java.lang.Class wrapType(java.lang.Class pType)
Returns the wrapper type for the given primitive type.- Parameters:
pType- the primitive tpye- Returns:
- the wrapper type
- Throws:
java.lang.IllegalArgumentException- ifpTypeis not a primitive type
-
isPrimitiveWrapper
public static boolean isPrimitiveWrapper(java.lang.Class pType)
Returnstrueif the given type is a primitive wrapper.- Parameters:
pType-- Returns:
trueif the given type is a primitive wrapper, otherwisefalse
-
-