code: public static Type getArrayComponentType(final Type type) {
          if (!isArray(type)) {
              throw new IllegalArgumentException("Provided type is not an array: "
                      + TypeToStringUtils.toStringType(type));
          }
          if (type instanceof GenericArrayType) {
              return ((GenericArrayType) type).getGenericComponentType();
          } else {
              return ((Class) type).getComponentType();
          }
      }
docs: For example, {@code getArrayComponentType(int[]) == int} and
  {@code getArrayComponentType(List<String>[]) == List<String>}.
  
  @param type array type (class or {@link GenericArrayType}
  @return array component type
  @throws IllegalArgumentException if provided type is not array
  @see #isArray(Type)