HRgiger's answer improved:
@SuppressWarnings("unchecked")
static <T> Class<? extends T[]> getArrayClass(Class<T> clazz) {
return (Class<? extends T[]>) Array.newInstance(clazz, 0).getClass();
}
Both of them instantiate an array object when invoked. To get the array type, use
Class<?> childType = ...;
Class<?> arrayType = getArrayClass(childType);