com.twelvemonkeys.lang
Class ReflectUtil

java.lang.Object
  extended by com.twelvemonkeys.lang.ReflectUtil

public final class ReflectUtil
extends Object

Util 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 $
Author:
Harald Kuhr

Method Summary
static boolean isPrimitiveWrapper(Class pType)
          Returns true if the given type is a primitive wrapper.
static Class unwrapType(Class pType)
          Returns the primitive type for the given wrapper type.
static Class wrapType(Class pType)
          Returns the wrapper type for the given primitive type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

unwrapType

public static Class unwrapType(Class pType)
Returns the primitive type for the given wrapper type.

Parameters:
pType - the wrapper type
Returns:
the primitive type
Throws:
IllegalArgumentException - if pType is not a primitive wrapper

wrapType

public static Class wrapType(Class pType)
Returns the wrapper type for the given primitive type.

Parameters:
pType - the primitive tpye
Returns:
the wrapper type
Throws:
IllegalArgumentException - if pType is not a primitive type

isPrimitiveWrapper

public static boolean isPrimitiveWrapper(Class pType)
Returns true if the given type is a primitive wrapper.

Parameters:
pType -
Returns:
true if the given type is a primitive wrapper, otherwise false


Copyright © 2015. All Rights Reserved.