void (final GeneratorAdapter generator, final Object value) { IconDescriptor descriptor = (IconDescriptor) value; generator.newInstance(ourImageIconType); generator.dup(); generator.loadThis(); generator.invokeVirtual(ourObjectType, ourGetClassMethod); generator.push("/" + descriptor.getIconPath()); generator.invokeVirtual(ourClassType, ourGetResourceMethod); generator.invokeConstructor(ourImageIconType, ourInitMethod); }