java.lang.reflect
Class Array
java.lang.Object
java.lang.reflect.Array
public final class Array
- extends Object
Standard array reflection class.
Compliance: J2SE: 1.4 complete
|
Constructor Summary |
Array()
|
|
Method Summary |
static Object |
get(Object array,
int index)
|
static boolean |
getBoolean(Object array,
int index)
|
static byte |
getByte(Object array,
int index)
|
static char |
getChar(Object array,
int index)
|
static double |
getDouble(Object array,
int index)
|
static float |
getFloat(Object array,
int index)
|
static int |
getInt(Object array,
int index)
|
static int |
getLength(Object array)
|
static long |
getLong(Object array,
int index)
|
static short |
getShort(Object array,
int index)
|
static Object |
newInstance(Class componentType,
int length)
|
static Object |
newInstance(Class componentType,
int[] dimensions)
|
static void |
set(Object array,
int index,
Object value)
|
static void |
setBoolean(Object array,
int index,
boolean z)
|
static void |
setByte(Object array,
int index,
byte b)
|
static void |
setChar(Object array,
int index,
char c)
|
static void |
setDouble(Object array,
int index,
double d)
|
static void |
setFloat(Object array,
int index,
float f)
|
static void |
setInt(Object array,
int index,
int i)
|
static void |
setLong(Object array,
int index,
long l)
|
static void |
setShort(Object array,
int index,
short s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Array
public Array()
newInstance
public static Object newInstance(Class componentType,
int length)
throws NegativeArraySizeException
- Throws:
NegativeArraySizeException
newInstance
public static Object newInstance(Class componentType,
int[] dimensions)
throws NegativeArraySizeException
- Throws:
NegativeArraySizeException
getLength
public static int getLength(Object array)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
get
public static Object get(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getBoolean
public static boolean getBoolean(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getByte
public static byte getByte(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getChar
public static char getChar(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getShort
public static short getShort(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getInt
public static int getInt(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getLong
public static long getLong(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getFloat
public static float getFloat(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
getDouble
public static double getDouble(Object array,
int index)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
set
public static void set(Object array,
int index,
Object value)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setBoolean
public static void setBoolean(Object array,
int index,
boolean z)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setByte
public static void setByte(Object array,
int index,
byte b)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setChar
public static void setChar(Object array,
int index,
char c)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setShort
public static void setShort(Object array,
int index,
short s)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setInt
public static void setInt(Object array,
int index,
int i)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setLong
public static void setLong(Object array,
int index,
long l)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setFloat
public static void setFloat(Object array,
int index,
float f)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
setDouble
public static void setDouble(Object array,
int index,
double d)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
- Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException