| org.mule.util.ArrayUtils
ArrayUtils | public class ArrayUtils extends org.apache.commons.lang.ArrayUtils (Code) | | |
toArrayOfComponentType | public static Object[] toArrayOfComponentType(Object[] objects, Class clazz)(Code) | | Creates a copy of the given array, but with the given Class as
element type. Useful for arrays of objects that implement multiple interfaces
and a "typed view" onto these objects is required.
Parameters: objects - the array of objects Parameters: clazz - the desired service type of the new array null when objects is null , or a newarray containing the elements of the source array which is typed tothe given clazz parameter. If clazz isalready the service type of the source array, the source array isreturned (i.e. no copy is created). throws: IllegalArgumentException - if the clazz argument isnull . throws: ArrayStoreException - if the elements in objects cannotbe cast to clazz . |
|
|