public class ArrayUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ArrayUtil.NonConvertable |
Modifier and Type | Field and Description |
---|---|
static ArrayUtil.NonConvertable |
NON_CONVERTABLE
An object indicating that the conversion is not possible
|
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
convertArrayToObject(java.lang.Object array,
java.lang.Class destClass)
Convert an array object of which type is T[] to ArrayOfT class.
|
static java.lang.Object |
convertObjectToArray(java.lang.Object obj,
java.lang.Class arrayType)
Convert ArrayOfT to T[].
|
static int |
getArrayDimension(java.lang.Class arrayType)
Gets the dimension of arrayType
|
static boolean |
isConvertable(java.lang.Class clazz,
java.lang.Class arrayType)
Check if the clazz(perhaps ArrayOfT class) can be converted to T[].
|
public static final ArrayUtil.NonConvertable NON_CONVERTABLE
public static java.lang.Object convertObjectToArray(java.lang.Object obj, java.lang.Class arrayType)
obj
- the object of type ArrayOfT to convertarrayType
- the destination array typepublic static boolean isConvertable(java.lang.Class clazz, java.lang.Class arrayType)
clazz
- a class of ArrayOfTarrayType
- an array class (T[])public static int getArrayDimension(java.lang.Class arrayType)
arrayType
- an array classpublic static java.lang.Object convertArrayToObject(java.lang.Object array, java.lang.Class destClass)
array
- the array objectdestClass
- the destination classCopyright ? 2005 Apache Web Services Project. All Rights Reserved.