private boolean isReadOnly(
      final String name, final ClassOrInterfaceTypeDetails governorTypeDetails) {
    List<String> readOnly = new ArrayList<String>();
    ClassOrInterfaceTypeDetails proxy = gwtTypeService.lookupProxyFromEntity(governorTypeDetails);
    if (proxy != null) {
      readOnly.addAll(GwtUtils.getAnnotationValues(proxy, RooJavaType.ROO_GWT_PROXY, "readOnly"));
    }

    return readOnly.contains(name);
  }
  public GwtTemplateDataHolder getMirrorTemplateTypeDetails(
      final ClassOrInterfaceTypeDetails mirroredType,
      final Map<JavaSymbolName, GwtProxyProperty> clientSideTypeMap,
      final String moduleName) {
    final ClassOrInterfaceTypeDetails proxy = gwtTypeService.lookupProxyFromEntity(mirroredType);
    final ClassOrInterfaceTypeDetails request =
        gwtTypeService.lookupRequestFromEntity(mirroredType);
    final JavaPackage topLevelPackage = projectOperations.getTopLevelPackage(moduleName);
    final Map<GwtType, JavaType> mirrorTypeMap =
        GwtUtils.getMirrorTypeMap(mirroredType.getName(), topLevelPackage);
    mirrorTypeMap.put(GwtType.PROXY, proxy.getName());
    mirrorTypeMap.put(GwtType.REQUEST, request.getName());

    final Map<GwtType, ClassOrInterfaceTypeDetails> templateTypeDetailsMap =
        new LinkedHashMap<GwtType, ClassOrInterfaceTypeDetails>();
    final Map<GwtType, String> xmlTemplates = new LinkedHashMap<GwtType, String>();
    for (final GwtType gwtType : GwtType.getMirrorTypes()) {
      if (gwtType.getTemplate() == null) {
        continue;
      }
      TemplateDataDictionary dataDictionary =
          buildMirrorDataDictionary(
              gwtType, mirroredType, proxy, mirrorTypeMap, clientSideTypeMap, moduleName);
      gwtType.dynamicallyResolveFieldsToWatch(clientSideTypeMap);
      gwtType.dynamicallyResolveMethodsToWatch(
          mirroredType.getName(), clientSideTypeMap, topLevelPackage);
      templateTypeDetailsMap.put(
          gwtType,
          getTemplateDetails(
              dataDictionary, gwtType.getTemplate(), mirrorTypeMap.get(gwtType), moduleName));

      if (gwtType.isCreateUiXml()) {
        dataDictionary =
            buildMirrorDataDictionary(
                gwtType, mirroredType, proxy, mirrorTypeMap, clientSideTypeMap, moduleName);
        final String contents =
            getTemplateContents(gwtType.getTemplate() + "UiXml", dataDictionary);
        xmlTemplates.put(gwtType, contents);
      }
    }

    final Map<String, String> xmlMap = new LinkedHashMap<String, String>();
    final List<ClassOrInterfaceTypeDetails> typeDetails =
        new ArrayList<ClassOrInterfaceTypeDetails>();
    for (final GwtProxyProperty proxyProperty : clientSideTypeMap.values()) {
      if (!proxyProperty.isCollection() || proxyProperty.isCollectionOfProxy()) {
        continue;
      }

      TemplateDataDictionary dataDictionary = TemplateDictionary.create();
      dataDictionary.setVariable("packageName", GwtPath.MANAGED_UI.packageName(topLevelPackage));
      dataDictionary.setVariable(
          "scaffoldUiPackage", GwtPath.SCAFFOLD_UI.packageName(topLevelPackage));
      final JavaType collectionTypeImpl =
          getCollectionImplementation(proxyProperty.getPropertyType());
      addImport(dataDictionary, collectionTypeImpl);
      addImport(dataDictionary, proxyProperty.getPropertyType());

      final String collectionType = proxyProperty.getPropertyType().getSimpleTypeName();
      final String boundCollectionType =
          proxyProperty.getPropertyType().getParameters().get(0).getSimpleTypeName();

      dataDictionary.setVariable("collectionType", collectionType);
      dataDictionary.setVariable("collectionTypeImpl", collectionTypeImpl.getSimpleTypeName());
      dataDictionary.setVariable("boundCollectionType", boundCollectionType);

      final JavaType collectionEditorType =
          new JavaType(
              GwtPath.MANAGED_UI.packageName(topLevelPackage)
                  + "."
                  + boundCollectionType
                  + collectionType
                  + "Editor");
      typeDetails.add(
          getTemplateDetails(dataDictionary, "CollectionEditor", collectionEditorType, moduleName));

      dataDictionary = TemplateDictionary.create();
      dataDictionary.setVariable("packageName", GwtPath.MANAGED_UI.packageName(topLevelPackage));
      dataDictionary.setVariable(
          "scaffoldUiPackage", GwtPath.SCAFFOLD_UI.packageName(topLevelPackage));
      dataDictionary.setVariable("collectionType", collectionType);
      dataDictionary.setVariable("collectionTypeImpl", collectionTypeImpl.getSimpleTypeName());
      dataDictionary.setVariable("boundCollectionType", boundCollectionType);
      addImport(dataDictionary, proxyProperty.getPropertyType());

      final String contents = getTemplateContents("CollectionEditor" + "UiXml", dataDictionary);
      final String packagePath =
          projectOperations
              .getPathResolver()
              .getFocusedIdentifier(
                  Path.SRC_MAIN_JAVA, GwtPath.MANAGED_UI.getPackagePath(topLevelPackage));
      xmlMap.put(
          packagePath + "/" + boundCollectionType + collectionType + "Editor.ui.xml", contents);
    }

    return new GwtTemplateDataHolder(templateTypeDetailsMap, xmlTemplates, typeDetails, xmlMap);
  }