The list of methods to do Array Type Get are organized into topic(s).
Class>
arrayBaseClass(Class> c) Gets the base component type of an array of arbitrary dimensions.
Class<?> result = c;
while (result.isArray()) {
result = result.getComponentType();
return result;
Class
arrayClass(Class klass) array Class
Class<A[]> result;
try {
result = (Class<A[]>) Class.forName("[" + klass.getName());
} catch (Exception e) {
throw new RuntimeException(e);
return result;
Class
arrayClass(Class compClass)
Return the array class that holds the specific component type.
ClassLoader loader = compClass.getClassLoader();
if (loader == null) {
loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader = ClassLoader.getSystemClassLoader();
if (loader == null) {
...
Class
arrayComponentClassFromArray(T[] arg)
Helper method to create an arrayComponentType from the componentType of an array that's provided.
return (Class<T>) arg.getClass().getComponentType();