The javadoc of GenericArrayType says it's a Type object for arrays whose
component type is either a parameterized type or a type variable.
The following code shows that the JRE creates GenericArrayType whose component
type is a Class object (Byte.TYPE)
The javadoc and the implementation are disagreeing with each other.
================================
import java.util.List;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.lang.reflect.ParameterizedType;
public class GenericsTest {
public static void main(String[] args) throws Exception {
Field f = GenericsTest.class.getField("lst");
Type t1 = f.getGenericType();
assert t1 instanceof ParameterizedType;
ParameterizedType t2 = (ParameterizedType) t1;
assert t2.getActualTypeArguments().length==1;
Type t3 = t2.getActualTypeArguments()[0];
assert t3==byte[].class : "expected byte[] but found "+t3.getClass();
}
public List<byte[]> lst;
}
==============