void (final GeneratorAdapter generator, final Object value) { final Rectangle rc = (Rectangle) value; generator.newInstance(myRectangleType); generator.dup(); generator.push(rc.x); generator.push(rc.y); generator.push(rc.width); generator.push(rc.height); generator.invokeConstructor(myRectangleType, myInitMethod); }