The ArrayType contains the code: public Object next () { if (type.typeId == BaseTypes.baseTypeChar) return new Character((char)v.getByte(idx * type.getSize())); else if (type.typeId == BaseTypes.baseTypeShort) return new Integer(v.getShort(idx * type.getSize())); else if (type.typeId == BaseTypes.baseTypeInteger) this doesn't work - as the "type" could be a pointer, or some other more abstract type. Instead the iteratore should use "ByteBuffer.slice" to slice the underlying array of bytes and then create a Variable from that.
struct is now supported, need to add pointers.