public static void validateNestedParameterizedType ( Type parameterType ) { if ( isParameterized ( parameterType ) || GenericArrayType . class . isAssignableFrom ( parameterType . getClass ( ) ) ) { throw new IllegalArgumentException ( "Invalid field. Cannot marshal fields of type Collection<GenericType> or GenericType[]." ) ; } }
Parameterized types nested more than one level cannot be determined at runtime . So cannot be marshalled .