private void generateClientProperties(final LwComponent lwComponent,
                                          final InstrumentationClassFinder.PseudoClass componentClass,
                                          final GeneratorAdapter generator,
                                          final int componentLocal) throws CodeGenerationException {
      for (Object o : lwComponent.getDelegeeClientProperties().entrySet()) {
        Map.Entry e = (Map.Entry)o;
        generator.loadLocal(componentLocal);

        generator.push((String)e.getKey());

        Object value = e.getValue();
        if (value instanceof StringDescriptor) {
          generator.push(((StringDescriptor)value).getValue());
        }
        else if (value instanceof Boolean) {
          boolean boolValue = ((Boolean)value).booleanValue();
          Type booleanType = Type.getType(Boolean.class);
          if (boolValue) {
            generator.getStatic(booleanType, "TRUE", booleanType);
          }
          else {
            generator.getStatic(booleanType, "FALSE", booleanType);
          }
        }
        else {
          Type valueType = Type.getType(value.getClass());
          generator.newInstance(valueType);
          generator.dup();
          if (value instanceof Integer) {
            generator.push(((Integer)value).intValue());
            generator.invokeConstructor(valueType, Method.getMethod("void <init>(int)"));
          }
          else if (value instanceof Double) {
            generator.push(((Double)value).doubleValue());
            generator.invokeConstructor(valueType, Method.getMethod("void <init>(double)"));
          }
          else {
            throw new CodeGenerationException(lwComponent.getId(), "Unknown client property value type");
          }
        }

        Type componentType = Type.getType(componentClass.getDescriptor());
        Type objectType = Type.getType(Object.class);
        generator.invokeVirtual(componentType, new Method("putClientProperty",
                                                          Type.VOID_TYPE, new Type[]{objectType, objectType}));
      }
    }
private void generateClientProperties(final LwComponent lwComponent,
                                          final InstrumentationClassFinder.PseudoClass componentClass,
                                          final GeneratorAdapter generator,
                                          final int componentLocal)