-
Enhancement
-
Resolution: Won't Fix
-
P5
-
None
-
1.1, 1.1.4, 1.1.5, 1.1.6
-
x86, sparc
-
solaris_2.5, solaris_2.6, windows_95, windows_nt
An API is needed to be able to create array classes.
A method can be added to java.lang.Class:
public Class getArrayType(int dimensions);
It would return a Class class for the array of that class with the
appropriate number of dimensions. If applied to an Array class
it would return a Class an array with a number of dimensions
equal to the existing array class plus the dimensions specified.
If applied to any of the primitive types it should create the
appropriately typed array.
This method is a campanion to Class.getComponentType.
Related methods for reflecting upon arrays in in java.lang.reflect.Array.
A method can be added to java.lang.Class:
public Class getArrayType(int dimensions);
It would return a Class class for the array of that class with the
appropriate number of dimensions. If applied to an Array class
it would return a Class an array with a number of dimensions
equal to the existing array class plus the dimensions specified.
If applied to any of the primitive types it should create the
appropriately typed array.
This method is a campanion to Class.getComponentType.
Related methods for reflecting upon arrays in in java.lang.reflect.Array.
- duplicates
-
JDK-4093690 rfe: About Java array Dynamics
- Closed
- relates to
-
JDK-8210031 implementation for JVM Constants API
- Resolved
-
JDK-6223347 (reflect) Add a generic replacement for Array.newInstance() to help write type safe code
- Closed