The short answer is to try grapefrukt and see.
However, I do not think this is possible at the bytecode level. The problem is related to the construction of generics (vectors). Basically the bytecode for instantiating Vector <> goes:
GenericDefinitionType (Vector) + GenericParameter (int) -> GenericType Coerce (cast) GenericType as KnownGenericType (eg. "Vector.<int>")
So the problem is not the creation, since the GenericParameter is just multi-named (which can be dynamic). The problem is forcing a known vector type (actually registered as "Vector. <int>", for example) since there is no known vector type.
See my post on how Vectors work in the bytecode to describe geeky.
source share