private void generateButtonGroups(final LwRootContainer rootContainer, final GeneratorAdapter generator) throws CodeGenerationException {
      IButtonGroup[] groups = rootContainer.getButtonGroups();
      if (groups.length > 0) {
        try {
          InstrumentationClassFinder.PseudoClass buttonGroupClass = null; // cached
          int groupLocal = generator.newLocal(ourButtonGroupType);
          for (IButtonGroup group : groups) {
            String[] ids = group.getComponentIds();

            if (ids.length > 0) {
              generator.newInstance(ourButtonGroupType);
              generator.dup();
              generator.invokeConstructor(ourButtonGroupType, Method.getMethod("void <init>()"));
              generator.storeLocal(groupLocal);

              if (group.isBound() && !myIgnoreCustomCreation) {
                if (buttonGroupClass == null) {
                  buttonGroupClass = myFinder.loadClass(ButtonGroup.class.getName());
                }
                validateFieldClass(group.getName(), buttonGroupClass, null);
                generator.loadThis();
                generator.loadLocal(groupLocal);
                generator.putField(getMainClassType(), group.getName(), ourButtonGroupType);
              }

              for (String id : ids) {
                Integer localInt = myIdToLocalMap.get(id);
                if (localInt != null) {
                  generator.loadLocal(groupLocal);
                  generator.loadLocal(localInt.intValue());
                  generator.invokeVirtual(ourButtonGroupType, Method.getMethod("void add(javax.swing.AbstractButton)"));
                }
              }
            }
          }
        }
        catch (IOException | ClassNotFoundException e) {
          throw new CodeGenerationException(rootContainer.getId(), e.getMessage(), e);
        }
      }
    }
private void generateButtonGroups(final LwRootContainer rootContainer, final GeneratorAdapter generator)