void (final GeneratorAdapter generator, final Object value) { final Insets insets = (Insets)value; generator.newInstance(myInsetsType); generator.dup(); generator.push(insets.top); generator.push(insets.left); generator.push(insets.bottom); generator.push(insets.right); generator.invokeConstructor(myInsetsType, Method.getMethod("void <init>(int,int,int,int)")); }