Returns the base type of an array Class. throws ReflectError if the Class is not an array class.
(Class arrayClass)
| 818 | * throws ReflectError if the Class is not an array class. |
| 819 | */ |
| 820 | public static Class getArrayBaseType(Class arrayClass) throws ReflectError { |
| 821 | if (!arrayClass.isArray()) { |
| 822 | throw new ReflectError("The class is not an array."); |
| 823 | } |
| 824 | |
| 825 | return arrayClass.getComponentType(); |
| 826 | |
| 827 | } |
| 828 | |
| 829 | |
| 830 | /** |