O
ohoehle
Hi!
There is a given object of type java.lang.Class and I want to get the
array class corresponding to my class, aka the Class object with a
componentType identical to the given Class object.
I did it this way...
public static Class getArrayClass(Class componentType) {
return Array.newInstance(componentType, 0).getClass();
}
but creating an array just to get its class is &§&%/()/%$/&%$!!! in my
eyes...
Do you know a better solution?
Regards
Oliver
There is a given object of type java.lang.Class and I want to get the
array class corresponding to my class, aka the Class object with a
componentType identical to the given Class object.
I did it this way...
public static Class getArrayClass(Class componentType) {
return Array.newInstance(componentType, 0).getClass();
}
but creating an array just to get its class is &§&%/()/%$/&%$!!! in my
eyes...
Do you know a better solution?
Regards
Oliver