private void generateComponentReferenceProperties(final LwComponent component,
                                                      final GeneratorAdapter generator) throws CodeGenerationException {
      if (component instanceof LwNestedForm) return;
      int componentLocal = myIdToLocalMap.get(component.getId()).intValue();
      final LayoutCodeGenerator layoutCodeGenerator = getComponentCodeGenerator(component.getParent());
      InstrumentationClassFinder.PseudoClass componentClass = getComponentClass(layoutCodeGenerator.mapComponentClass(component.getComponentClassName()), myFinder);

      final LwIntrospectedProperty[] introspectedProperties = component.getAssignedIntrospectedProperties();
      for (final LwIntrospectedProperty property : introspectedProperties) {
        if (property instanceof LwIntroComponentProperty) {
          String targetId = (String)component.getPropertyValue(property);
          if (targetId != null && !targetId.isEmpty()) {
            // we may have a reference property pointing to a component which is
            // no longer valid
            final Integer targetLocalInt = myIdToLocalMap.get(targetId);
            if (targetLocalInt != null) {
              int targetLocal = targetLocalInt.intValue();
              generator.loadLocal(componentLocal);
              generator.loadLocal(targetLocal);
              Type declaringType = (property.getDeclaringClassName() != null)
                                   ? typeFromClassName(property.getDeclaringClassName())
                                   : Type.getType(componentClass.getDescriptor());
              generator.invokeVirtual(declaringType,
                                      new Method(property.getWriteMethodName(),
                                                 Type.VOID_TYPE, new Type[]{typeFromClassName(property.getPropertyClassName())}));
            }
          }
        }
      }

      if (component instanceof LwContainer) {
        LwContainer container = (LwContainer) component;

        for(int i=0; i<container.getComponentCount(); i++) {
          generateComponentReferenceProperties((LwComponent) container.getComponent(i), generator);
        }
      }
    }
private void generateComponentReferenceProperties(final LwComponent component,
                                                      final GeneratorAdapter generator)