void (final GeneratorAdapter generator, final Object value) { String[] items = (String[]) value; int listModelLocal = generator.newLocal(myListModelType); generator.newInstance(myListModelType); generator.dup(); generator.invokeConstructor(myListModelType, ourInitMethod); generator.storeLocal(listModelLocal); for (String item : items) { generator.loadLocal(listModelLocal); generator.push(item); generator.invokeVirtual(myListModelType, ourAddElementMethod); } generator.loadLocal(listModelLocal); }