|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jp.develop.common.util.TypeUtil
public final class TypeUtil
Utilities for Type information. This class is aimed to support generics operation.
Method Summary | ||
---|---|---|
static
|
getCollectionType(Class<T> collection,
Type elementType)
Get the type having collection's actual class and element's actual class. |
|
static GenericArrayType |
getGenericArrayType(Type genericComponentType)
General purpose method to get GenericArrayType. |
|
static
|
getMapType(Class<T> map,
Type keyType,
Type valueType)
Get the type having map's actual class and key and value's actual class. |
|
static ParameterizedType |
getParameterizedType(Class<?> rawType,
Type... actualTypeArguments)
General purpose method to get ParameterizedType. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T extends Collection<?>> ParameterizedType getCollectionType(Class<T> collection, Type elementType)
T
- Class implements Collection.collection
- Class of Collection.elementType
- Class of Elements.
public static <T extends Map<?,?>> ParameterizedType getMapType(Class<T> map, Type keyType, Type valueType)
T
- Class implements Map.map
- Class of Map.keyType
- Class of Key.valueType
- Class of Value.
public static ParameterizedType getParameterizedType(Class<?> rawType, Type... actualTypeArguments)
rawType
- Raw type of parameterizedType.actualTypeArguments
- Actual type arguments of parameterizedType.
public static GenericArrayType getGenericArrayType(Type genericComponentType)
genericComponentType
- Type of array elements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |