public static Type getArrayElementType(Type t) {
    if (t instanceof Class && ((Class<?>) t).isArray()) {
      Class<?> arrayClass = (Class<?>) t;
      return arrayClass.getComponentType();
    } else if (t instanceof GenericArrayType) {
      GenericArrayType arrayType = (GenericArrayType) t;
      return arrayType.getGenericComponentType();
    }
    return null;
  }
Returns the array element type, if the Type is an array (Object[]), or
GenericArrayType (Map&lt;String,String&gt;[]). Otherwise return null.
serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java