ewe.reflect
Class Array

java.lang.Object
  extended byewe.reflect.Array

public class Array
extends Object


Constructor Summary
Array()
           
 
Method Summary
static Class getComponentType(Object array)
           
static Wrapper getElement(Object array, int index, Wrapper dest)
           
static int getLength(Object array)
           
static boolean isArray(Object array)
           
static Object newInstance(Class type, int len)
           
static Object newInstance(String className, int len)
          Create a new instance of a particular class - which cannot be a primitive value, but can be of an array or object type.
static void setElement(Object array, int index, Wrapper value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Constructor Detail

Array

public Array()
Method Detail

isArray

public static boolean isArray(Object array)

getComponentType

public static Class getComponentType(Object array)

getLength

public static int getLength(Object array)

newInstance

public static Object newInstance(Class type,
                                 int len)

newInstance

public static Object newInstance(String className,
                                 int len)
Create a new instance of a particular class - which cannot be a primitive value, but can be of an array or object type. All active class loaders are searched to resolve the class if necessary.

Parameters:
className - A class or array name.
len - The number of elements.
Returns:
An array if it could be created.

setElement

public static void setElement(Object array,
                              int index,
                              Wrapper value)

getElement

public static Wrapper getElement(Object array,
                                 int index,
                                 Wrapper dest)