fixed some formatting typos
[vimdoclet.git] / sample / java.lang.reflect.Array.txt
blobfafc9c5ba118a5c6883df52a34fd3d60cd29c2f6
1 *java.lang.reflect.Array* *Array* The Array class provides static methods to dyn
3 public final class Array
4   extends    |java.lang.Object|
6 |java.lang.reflect.Array_Description|
7 |java.lang.reflect.Array_Fields|
8 |java.lang.reflect.Array_Constructors|
9 |java.lang.reflect.Array_Methods|
11 ================================================================================
13 *java.lang.reflect.Array_Methods*
14 |java.lang.reflect.Array.get(Object,int)|Returns the value of the indexed compo
15 |java.lang.reflect.Array.getBoolean(Object,int)|Returns the value of the indexe
16 |java.lang.reflect.Array.getByte(Object,int)|Returns the value of the indexed c
17 |java.lang.reflect.Array.getChar(Object,int)|Returns the value of the indexed c
18 |java.lang.reflect.Array.getDouble(Object,int)|Returns the value of the indexed
19 |java.lang.reflect.Array.getFloat(Object,int)|Returns the value of the indexed 
20 |java.lang.reflect.Array.getInt(Object,int)|Returns the value of the indexed co
21 |java.lang.reflect.Array.getLength(Object)|Returns the length of the specified 
22 |java.lang.reflect.Array.getLong(Object,int)|Returns the value of the indexed c
23 |java.lang.reflect.Array.getShort(Object,int)|Returns the value of the indexed 
24 |java.lang.reflect.Array.newInstance(Class<?>,int...)|Creates a new array  with
25 |java.lang.reflect.Array.newInstance(Class<?>,int)|Creates a new array with the
26 |java.lang.reflect.Array.set(Object,int,Object)|Sets the value of the indexed c
27 |java.lang.reflect.Array.setBoolean(Object,int,boolean)|Sets the value of the i
28 |java.lang.reflect.Array.setByte(Object,int,byte)|Sets the value of the indexed
29 |java.lang.reflect.Array.setChar(Object,int,char)|Sets the value of the indexed
30 |java.lang.reflect.Array.setDouble(Object,int,double)|Sets the value of the ind
31 |java.lang.reflect.Array.setFloat(Object,int,float)|Sets the value of the index
32 |java.lang.reflect.Array.setInt(Object,int,int)|Sets the value of the indexed c
33 |java.lang.reflect.Array.setLong(Object,int,long)|Sets the value of the indexed
34 |java.lang.reflect.Array.setShort(Object,int,short)|Sets the value of the index
36 *java.lang.reflect.Array_Description*
38 The Array class provides static methods to dynamically create and access Java 
39 arrays. 
41 Array permits widening conversions to occur during a get or set operation, but 
42 throws an IllegalArgumentException if a narrowing conversion would occur. 
46 *java.lang.reflect.Array.get(Object,int)*
48 public static native |java.lang.Object| get(
49   java.lang.Object array,
50   int index)
51   throws |java.lang.ArrayIndexOutOfBoundsException|
52          |java.lang.IllegalArgumentException|
53          
54 Returns the value of the indexed component in the specified array object. The 
55 value is automatically wrapped in an object if it has a primitive type. 
58     array - the array 
59     index - the index 
61     Returns: the (possibly wrapped) value of the indexed component in the specified array 
63 *java.lang.reflect.Array.getBoolean(Object,int)*
65 public static native boolean getBoolean(
66   java.lang.Object array,
67   int index)
68   throws |java.lang.ArrayIndexOutOfBoundsException|
69          |java.lang.IllegalArgumentException|
70          
71 Returns the value of the indexed component in the specified array object, as a 
72 boolean. 
75     array - the array 
76     index - the index 
78     Returns: the value of the indexed component in the specified array 
80 *java.lang.reflect.Array.getByte(Object,int)*
82 public static native byte getByte(
83   java.lang.Object array,
84   int index)
85   throws |java.lang.ArrayIndexOutOfBoundsException|
86          |java.lang.IllegalArgumentException|
87          
88 Returns the value of the indexed component in the specified array object, as a 
89 byte. 
92     array - the array 
93     index - the index 
95     Returns: the value of the indexed component in the specified array 
97 *java.lang.reflect.Array.getChar(Object,int)*
99 public static native char getChar(
100   java.lang.Object array,
101   int index)
102   throws |java.lang.ArrayIndexOutOfBoundsException|
103          |java.lang.IllegalArgumentException|
104          
105 Returns the value of the indexed component in the specified array object, as a 
106 char. 
109     array - the array 
110     index - the index 
112     Returns: the value of the indexed component in the specified array 
114 *java.lang.reflect.Array.getDouble(Object,int)*
116 public static native double getDouble(
117   java.lang.Object array,
118   int index)
119   throws |java.lang.ArrayIndexOutOfBoundsException|
120          |java.lang.IllegalArgumentException|
121          
122 Returns the value of the indexed component in the specified array object, as a 
123 double. 
126     array - the array 
127     index - the index 
129     Returns: the value of the indexed component in the specified array 
131 *java.lang.reflect.Array.getFloat(Object,int)*
133 public static native float getFloat(
134   java.lang.Object array,
135   int index)
136   throws |java.lang.ArrayIndexOutOfBoundsException|
137          |java.lang.IllegalArgumentException|
138          
139 Returns the value of the indexed component in the specified array object, as a 
140 float. 
143     array - the array 
144     index - the index 
146     Returns: the value of the indexed component in the specified array 
148 *java.lang.reflect.Array.getInt(Object,int)*
150 public static native int getInt(
151   java.lang.Object array,
152   int index)
153   throws |java.lang.ArrayIndexOutOfBoundsException|
154          |java.lang.IllegalArgumentException|
155          
156 Returns the value of the indexed component in the specified array object, as an 
157 int. 
160     array - the array 
161     index - the index 
163     Returns: the value of the indexed component in the specified array 
165 *java.lang.reflect.Array.getLength(Object)*
167 public static native int getLength(java.lang.Object array)
168   throws |java.lang.IllegalArgumentException|
169          
170 Returns the length of the specified array object, as an int. 
173     array - the array 
175     Returns: the length of the array 
177 *java.lang.reflect.Array.getLong(Object,int)*
179 public static native long getLong(
180   java.lang.Object array,
181   int index)
182   throws |java.lang.ArrayIndexOutOfBoundsException|
183          |java.lang.IllegalArgumentException|
184          
185 Returns the value of the indexed component in the specified array object, as a 
186 long. 
189     array - the array 
190     index - the index 
192     Returns: the value of the indexed component in the specified array 
194 *java.lang.reflect.Array.getShort(Object,int)*
196 public static native short getShort(
197   java.lang.Object array,
198   int index)
199   throws |java.lang.ArrayIndexOutOfBoundsException|
200          |java.lang.IllegalArgumentException|
201          
202 Returns the value of the indexed component in the specified array object, as a 
203 short. 
206     array - the array 
207     index - the index 
209     Returns: the value of the indexed component in the specified array 
211 *java.lang.reflect.Array.newInstance(Class<?>,int...)*
213 public static |java.lang.Object| newInstance(
214   java.lang.Class<?> componentType,
215   int[] dimensions)
216   throws |java.lang.IllegalArgumentException|
217          |java.lang.NegativeArraySizeException|
218          
219 Creates a new array with the specified component type and dimensions. If 
220 componentType represents a non-array class or interface, the new array has 
221 dimensions.length dimensions and componentType as its component type. If 
222 componentType represents an array class, the number of dimensions of the new 
223 array is equal to the sum of dimensions.length and the number of dimensions of 
224 componentType. In this case, the component type of the new array is the 
225 component type of componentType. 
227 The number of dimensions of the new array must not exceed the number of array 
228 dimensions supported by the implementation (typically 255). 
231     componentType - the Class object representing the component type of the new array 
232     dimensions - an array of int representing the dimensions of the new array 
234     Returns: the new array 
236 *java.lang.reflect.Array.newInstance(Class<?>,int)*
238 public static |java.lang.Object| newInstance(
239   java.lang.Class<?> componentType,
240   int length)
241   throws |java.lang.NegativeArraySizeException|
242          
243 Creates a new array with the specified component type and length. Invoking this 
244 method is equivalent to creating an array as follows: 
248 int[] x = {length}; Array.newInstance(componentType, x); 
253     componentType - the Class object representing the component type of the new array 
254     length - the length of the new array 
256     Returns: the new array 
258 *java.lang.reflect.Array.set(Object,int,Object)*
260 public static native void set(
261   java.lang.Object array,
262   int index,
263   java.lang.Object value)
264   throws |java.lang.ArrayIndexOutOfBoundsException|
265          |java.lang.IllegalArgumentException|
266          
267 Sets the value of the indexed component of the specified array object to the 
268 specified new value. The new value is first automatically unwrapped if the 
269 array has a primitive component type. 
272     array - the array 
273     index - the index into the array 
274     value - the new value of the indexed component 
276 *java.lang.reflect.Array.setBoolean(Object,int,boolean)*
278 public static native void setBoolean(
279   java.lang.Object array,
280   int index,
281   boolean z)
282   throws |java.lang.ArrayIndexOutOfBoundsException|
283          |java.lang.IllegalArgumentException|
284          
285 Sets the value of the indexed component of the specified array object to the 
286 specified boolean value. 
289     array - the array 
290     index - the index into the array 
291     z - the new value of the indexed component 
293 *java.lang.reflect.Array.setByte(Object,int,byte)*
295 public static native void setByte(
296   java.lang.Object array,
297   int index,
298   byte b)
299   throws |java.lang.ArrayIndexOutOfBoundsException|
300          |java.lang.IllegalArgumentException|
301          
302 Sets the value of the indexed component of the specified array object to the 
303 specified byte value. 
306     array - the array 
307     index - the index into the array 
308     b - the new value of the indexed component 
310 *java.lang.reflect.Array.setChar(Object,int,char)*
312 public static native void setChar(
313   java.lang.Object array,
314   int index,
315   char c)
316   throws |java.lang.ArrayIndexOutOfBoundsException|
317          |java.lang.IllegalArgumentException|
318          
319 Sets the value of the indexed component of the specified array object to the 
320 specified char value. 
323     array - the array 
324     index - the index into the array 
325     c - the new value of the indexed component 
327 *java.lang.reflect.Array.setDouble(Object,int,double)*
329 public static native void setDouble(
330   java.lang.Object array,
331   int index,
332   double d)
333   throws |java.lang.ArrayIndexOutOfBoundsException|
334          |java.lang.IllegalArgumentException|
335          
336 Sets the value of the indexed component of the specified array object to the 
337 specified double value. 
340     array - the array 
341     index - the index into the array 
342     d - the new value of the indexed component 
344 *java.lang.reflect.Array.setFloat(Object,int,float)*
346 public static native void setFloat(
347   java.lang.Object array,
348   int index,
349   float f)
350   throws |java.lang.ArrayIndexOutOfBoundsException|
351          |java.lang.IllegalArgumentException|
352          
353 Sets the value of the indexed component of the specified array object to the 
354 specified float value. 
357     array - the array 
358     index - the index into the array 
359     f - the new value of the indexed component 
361 *java.lang.reflect.Array.setInt(Object,int,int)*
363 public static native void setInt(
364   java.lang.Object array,
365   int index,
366   int i)
367   throws |java.lang.ArrayIndexOutOfBoundsException|
368          |java.lang.IllegalArgumentException|
369          
370 Sets the value of the indexed component of the specified array object to the 
371 specified int value. 
374     array - the array 
375     index - the index into the array 
376     i - the new value of the indexed component 
378 *java.lang.reflect.Array.setLong(Object,int,long)*
380 public static native void setLong(
381   java.lang.Object array,
382   int index,
383   long l)
384   throws |java.lang.ArrayIndexOutOfBoundsException|
385          |java.lang.IllegalArgumentException|
386          
387 Sets the value of the indexed component of the specified array object to the 
388 specified long value. 
391     array - the array 
392     index - the index into the array 
393     l - the new value of the indexed component 
395 *java.lang.reflect.Array.setShort(Object,int,short)*
397 public static native void setShort(
398   java.lang.Object array,
399   int index,
400   short s)
401   throws |java.lang.ArrayIndexOutOfBoundsException|
402          |java.lang.IllegalArgumentException|
403          
404 Sets the value of the indexed component of the specified array object to the 
405 specified short value. 
408     array - the array 
409     index - the index into the array 
410     s - the new value of the indexed component