Author: fdesbois Date: 2010-06-27 16:01:18 +0200 (Sun, 27 Jun 2010) New Revision: 2039 Url: http://nuiton.org/repositories/revision/topia/2039 Log: Evo #609 : Revert aggregate and composite refactor, only accept methods contains same condition for entity properties. Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-06-27 12:51:25 UTC (rev 2038) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-06-27 14:01:18 UTC (rev 2039) @@ -133,8 +133,8 @@ // Create Entity Abstract class and its header createEntityAbstractClass(input); - // Start util operations : create operations : accept, aggregate, composite, toString - startGenerateUtilOperations(input); + // Create accept operation, will be updated during attribute route + createAcceptOperation(); // Add constant, attribute and operations for each property generateProperties(input.getAttributes()); @@ -148,9 +148,11 @@ associationClass = false; } - // Stop util operations : set each operation body - stopGenerateUtilOperations(); + closeAcceptOperation(); + // Add util operations : accept, aggregate, composite, toString, i18n block + generateUtilOperations(input); + // Add extra constants (from uml dependency) generateExtraConstants(input); @@ -204,10 +206,6 @@ outputAbstract = createAbstractClass(input.getName() + "Abstract", input.getPackageName()); - // These import will be removed (will be automatically added if needed) -// addImport(output, TopiaEntity.class); - addImport(outputAbstract, TopiaContextImplementor.class); - // Documentation StringBuilder doc = new StringBuilder(); doc.append("Implantation POJO pour l'entité {@link "); @@ -315,41 +313,17 @@ setSuperClass(outputImpl, input.getQualifiedName() + "Abstract"); } - protected void startGenerateUtilOperations(ObjectModelClass input) { + protected void generateUtilOperations(ObjectModelClass input) { - createAcceptOperation(); + generateI18nBlock(input); - // Imports needed for aggregate and composite operations - addImport(outputAbstract, ArrayList.class); - addImport(outputAbstract, List.class); + generateAggregateMethod(input); - createAggregateOperation(); + generateCompositeMethod(input); - createCompositeOperation(); - - boolean doGenerateToString = TopiaGeneratorUtil.generateToString(input, - model); - if (doGenerateToString) { - addImport(outputAbstract, ToStringBuilder.class); - generateToStringMethod(outputAbstract, input); - } - - String i18nPrefix = TopiaGeneratorUtil.getI18nPrefix(input, model); - if (!StringUtils.isEmpty(i18nPrefix)) { - // generate i18n prefix - generateI18n(outputAbstract, i18nPrefix, input); - } + generateToStringMethod(input); } - protected void stopGenerateUtilOperations() { - - closeAcceptOperation(); - - closeAggregateOperation(); - - closeCompositeOperation(); - } - /** * Generate extra constants if {@code input} has dependencies on * enum used as constant injector. @@ -414,6 +388,8 @@ generatePropertyConstant(attribute); generatePropertyAttribute(attribute); + + updateAcceptOperation(attribute); } if (!attribute.isNavigable() && @@ -431,6 +407,9 @@ // operations generatePropertyOperations(attribute); + + // update accept body + updateAcceptOperation(attribute); } } @@ -493,11 +472,6 @@ //TODO tchemit 20100513 Test it still works addAnnotation(outputAbstract, property, annotation); } - - // Update util operations body - updateAcceptOperation(attribute); - updateAggregateOperation(attribute); - updateCompositeOperation(attribute); } /** @@ -1125,34 +1099,23 @@ private StringBuilder acceptOperationBody; - private ObjectModelOperation aggregateOperation; - - private StringBuilder aggregateOperationBody; - - private ObjectModelOperation compositeOperation; - - private StringBuilder compositeOperationBody; - protected void createAcceptOperation() { - // Interface operation - ObjectModelOperation interfaceOperation = - addOperation(outputInterface, "accept", void.class); + + // Declaration + acceptOperation = addOperation(outputAbstract, "accept", void.class); ObjectModelParameter param = - addParameter(interfaceOperation, EntityVisitor.class, "visitor"); + addParameter(acceptOperation, EntityVisitor.class, "visitor"); - addException(interfaceOperation, TopiaException.class); + addException(acceptOperation, TopiaException.class); // Documentation - setDocumentation(interfaceOperation, "Envoi via les methodes du visitor l'ensemble des " + + setDocumentation(acceptOperation, "Envoi via les methodes du visitor l'ensemble des " + "champs de l'entity\n" + "avec leur nom, type et valeur."); setDocumentation(param, "le visiteur de l'entite."); - // Implementation - acceptOperation = createImplOperation(interfaceOperation); - - acceptOperationBody = new StringBuilder(); - acceptOperationBody.append("" + // Body init + acceptOperationBody = new StringBuilder("" /*{ visitor.start(this); }*/ @@ -1189,207 +1152,136 @@ " " : acceptOperationBody.toString()); } - protected void createAggregateOperation() { + @Deprecated + protected void generateAcceptMethod(ObjectModelClass input) { - // Interface operation - ObjectModelOperation interfaceOperation = - addOperation(outputInterface, "getAggregate", - List.class.getName() + '<' + TopiaEntity.class.getName() + '>'); + ObjectModelOperation operation = + addOperation(outputAbstract, "accept", void.class); - addException(interfaceOperation, TopiaException.class); + addException(operation, TopiaException.class); + addAnnotation(outputAbstract, operation, Override.class.getSimpleName()); + setDocumentation(operation, + "Envoi via les methodes du visitor l'ensemble des " + + "champs de l'entity\n" + + "avec leur nom, type et valeur."); - // Implementation - aggregateOperation = createImplOperation(interfaceOperation); + ObjectModelParameter param = + addParameter(operation, EntityVisitor.class, "visitor"); + setDocumentation(param, "le visiteur de l'entite."); - aggregateOperationBody = new StringBuilder("" + StringBuilder body = new StringBuilder("" /*{ - List<TopiaEntity> tmp = new ArrayList<TopiaEntity>(); - - // pour tous les attributs rechecher les composites et les class d'asso - // on les ajoute dans tmp + visitor.start(this); }*/ ); - } + for (ObjectModelAttribute attr : input.getAttributes()) { + ObjectModelAttribute reverse = attr.getReverseAttribute(); - protected void updateAggregateOperation(ObjectModelAttribute attribute) { - if (attribute.isAggregate() && - attribute.referenceClassifier() && - attribute.getClassifier().hasStereotype(STEREOTYPE_ENTITY)) { - - String attrName = attribute.getName(); - String getterName = "get" + StringUtils.capitalize(attrName); - if (GeneratorUtil.isNMultiplicity(attribute)) { - aggregateOperationBody.append("" -/*{ tmp.addAll(<%=getterName%>()); -}*/ - ); - } else { - aggregateOperationBody.append("" -/*{ tmp.add(<%=getterName%>()); -}*/ - ); + // pour les asso quoi qu'il arrive il faut les lier des 2 cotes + // pour pouvoir supprimer en cascade l'asso lors de la suppression + // d'un des cotes + if (!(attr.isNavigable() + || hasUnidirectionalRelationOnAbstractType(reverse, model) + || attr.hasAssociationClass())) { + continue; } - } - } - protected void closeAggregateOperation() { - aggregateOperationBody.append("" -/*{ - // on refait un tour sur chaque entity de tmp pour recuperer leur - // composite - List<TopiaEntity> result = new ArrayList<TopiaEntity>(); - for (TopiaEntity entity : tmp) { - result.add(entity); - result.addAll(entity.getAggregate()); - } - - return result; + if (!attr.hasAssociationClass()) { + String attrType = TopiaGeneratorUtil.getSimpleName(attr.getType()); + String attrName = attr.getName(); + if (!GeneratorUtil.isNMultiplicity(attr)) { + body.append("" +/*{ visitor.visit(this, <%=getConstantName(attrName)%>, <%=attrType%>.class, <%=attrName%>); }*/ - ); - setOperationBody(aggregateOperation, aggregateOperationBody.length() == 0 ? - " " : aggregateOperationBody.toString()); - } - - protected void createCompositeOperation() { - - // Interface operation - ObjectModelOperation interfaceOperation = - addOperation(outputInterface, "getComposite", - List.class.getName() + '<' + TopiaEntity.class.getName() + '>'); - - addException(interfaceOperation, TopiaException.class); - - // Implementation - compositeOperation = createImplOperation(interfaceOperation); - - compositeOperationBody = new StringBuilder("" -/*{ - List<TopiaEntity> tmp = new ArrayList<TopiaEntity>(); - - // pour tous les attributs rechecher les composites et les class d'asso - // on les ajoute dans tmp -}*/ - ); - } - - protected void updateCompositeOperation(ObjectModelAttribute attribute) { - if (attribute.referenceClassifier() && - attribute.getClassifier().hasStereotype(STEREOTYPE_ENTITY)) { - if (attribute.isComposite()) { - String attrName = attribute.getName(); - String getterName = "get" + StringUtils.capitalize(attrName); - if (GeneratorUtil.isNMultiplicity(attribute)) { - compositeOperationBody.append("" -/*{ if (<%=getterName%>() != null) { - tmp.addAll(<%=getterName%>()); - } -}*/ ); } else { - compositeOperationBody.append("" -/*{ tmp.add(<%=getterName%>()); + String collectionType = TopiaGeneratorUtil.getSimpleName( + TopiaGeneratorUtil.getNMultiplicityInterfaceType( + attr)); + body.append("" +/*{ visitor.visit(this, <%=getConstantName(attrName)%>, <%=collectionType%>.class, <%=attrType%>.class, <%=attrName%>); }*/ ); } - } else if (attribute.hasAssociationClass()) { - String assocAttrName = GeneratorUtil.getAssocAttrName( - attribute); + } else { + String assocAttrName = GeneratorUtil.getAssocAttrName(attr); + assocAttrName = GeneratorUtil.toLowerCaseFirstLetter(assocAttrName); String assocClassFQN = TopiaGeneratorUtil.getSimpleName( - attribute.getAssociationClass().getQualifiedName()); - String ref = "this." + GeneratorUtil.toLowerCaseFirstLetter( - assocAttrName); - if (!GeneratorUtil.isNMultiplicity(attribute)) { - compositeOperationBody.append("" -/*{ - if (<%=ref%> != null) { - tmp.add(<%=ref%>); - } + attr.getAssociationClass().getQualifiedName()); + if (!GeneratorUtil.isNMultiplicity(attr)) { + body.append("" +/*{ visitor.visit(this, <%=getConstantName(assocAttrName)%>, <%=assocClassFQN%>.class, <%=assocAttrName%>); }*/ ); } else { - ObjectModelAttribute reverse = attribute.getReverseAttribute(); - String reverseAttrName = reverse.getName(); - // On utilise pas l'attribut car il est potentiellement - // pas a jour, car pour les asso avec cardinalité - // personne ne fait de add. Ce qui est normal, mais - // pour pouvoir faire tout de meme des delete en cascade - // sur les asso, le champs est dans le mapping - // hibernate et donc il le faut aussi dans la classe - // sinon hibernate rale lorsqu'il charge l'objet -// if (<%=ref%> != null) { -// tmp.addAll(<%=ref%>); -// } - compositeOperationBody.append("" -/*{ - { - org.nuiton.topia.persistence.TopiaDAO<<%=assocClassFQN%>> dao = ((TopiaContextImplementor) getTopiaContext()).getDAO(<%=assocClassFQN%>.class); - List<<%=assocClassFQN%>> findAllByProperties = dao.findAllByProperties("<%=reverseAttrName%>", this); - if (findAllByProperties != null) { - tmp.addAll(findAllByProperties); - } - } + String collectionType = TopiaGeneratorUtil.getNMultiplicityInterfaceType(attr); + body.append("" +/*{ visitor.visit(this, <%=getConstantName(assocAttrName)%>, <%=collectionType%>.class, <%=assocClassFQN%>.class, <%=assocAttrName%>); }*/ ); } } } - } - protected void closeCompositeOperation() { - compositeOperationBody.append("" -/*{ - // on refait un tour sur chaque entity de tmp pour recuperer leur - // composite - List<TopiaEntity> result = new ArrayList<TopiaEntity>(); - for (TopiaEntity entity : tmp) { - if (entity != null) { - result.add(entity); - result.addAll(entity.getComposite()); + //Déclaration des attributs d'une classe d'associations + if (input instanceof ObjectModelAssociationClass) { + ObjectModelAssociationClass assoc = (ObjectModelAssociationClass) input; + for (ObjectModelAttribute attr : assoc.getParticipantsAttributes()) { + if (attr != null) { + String attrType = TopiaGeneratorUtil.getSimpleName( + attr.getType()); + String attrName = attr.getName(); + attrName = GeneratorUtil.toLowerCaseFirstLetter(attrName); + body.append("" +/*{ visitor.visit(this, <%=getConstantName(attrName)%>, <%=attrType%>.class, <%=attrName%>); +}*/ + ); + } } } - - return result; - }*/ + body.append("" +/*{ visitor.end(this); +}*/ ); - setOperationBody(compositeOperation, compositeOperationBody.length() == 0 ? - " " : compositeOperationBody.toString()); + setOperationBody(operation, body.length() == 0 ? " " : body.toString()); } + protected void generateToStringMethod(ObjectModelClass input) { - ///////////////////////////////// OLD + if (!TopiaGeneratorUtil.generateToString(input, model)) { + return; + } - // ------------------------------------------------------------------------- - // Abstract generation - // ------------------------------------------------------------------------- - - protected void generateToStringMethod(ObjectModelClass output, - ObjectModelClass clazz) { if (log.isDebugEnabled()) { - log.debug("generate toString method for clazz " + - clazz.getQualifiedName()); + log.debug("generate toString method for entity " + + outputInterface.getQualifiedName()); } - ObjectModelOperation op = addOperation(output, - "toString", - String.class, - ObjectModelModifier.PUBLIC); - addAnnotation(output, op, Override.class.getSimpleName()); - StringBuilder body = new StringBuilder(); + ObjectModelOperation operation = + addOperation(outputAbstract, "toString", String.class); + addAnnotation(outputAbstract, operation, Override.class.getSimpleName()); - body.append("" + addImport(outputAbstract, ToStringBuilder.class); + + StringBuilder body = new StringBuilder("" /*{ String result = new ToStringBuilder(this). }*/ ); - for (ObjectModelAttribute attr : clazz.getAttributes()) { + for (ObjectModelAttribute attr : input.getAttributes()) { + //FIXME possibilité de boucles (non directes) + ObjectModelClass attrEntity = null; + if (model.hasClass(attr.getType())) { attrEntity = model.getClass(attr.getType()); } + boolean isEntity = attrEntity != null && attrEntity.hasStereotype(STEREOTYPE_ENTITY); + ObjectModelAttribute reverse = attr.getReverseAttribute(); if (isEntity && (reverse == null || !reverse.isNavigable()) && !attr.hasAssociationClass() || !isEntity) { @@ -1405,22 +1297,23 @@ return result; }*/ ); - setOperationBody(op, body.length() == 0 ? " " : body.toString()); + setOperationBody(operation, body.length() == 0 ? " " : body.toString()); } - @Deprecated - protected void generateCompositeMethod(ObjectModelClass output, - ObjectModelClass clazz) { + protected void generateCompositeMethod(ObjectModelClass input) { - ObjectModelOperation op = addOperation(output, - "getComposite", - List.class.getName() + '<' + TopiaEntity.class.getName() + '>', - ObjectModelModifier.PUBLIC); - addException(op, TopiaException.class); - addAnnotation(output, op, Override.class.getSimpleName()); - StringBuilder body = new StringBuilder(); - body.append("" + ObjectModelOperation operation = + addOperation(outputAbstract, "getComposite", + List.class.getName() + '<' + TopiaEntity.class.getName() + '>'); + + addException(operation, TopiaException.class); + addAnnotation(outputAbstract, operation, Override.class.getSimpleName()); + + addImport(outputAbstract, ArrayList.class); + addImport(outputAbstract, List.class); + + StringBuilder body = new StringBuilder("" /*{ List<TopiaEntity> tmp = new ArrayList<TopiaEntity>(); @@ -1428,10 +1321,12 @@ // on les ajoute dans tmp }*/ ); - for (ObjectModelAttribute attr : clazz.getAttributes()) { + for (ObjectModelAttribute attr : input.getAttributes()) { + if (attr.referenceClassifier() && attr.getClassifier().hasStereotype( STEREOTYPE_ENTITY)) { + if (attr.isComposite()) { String attrName = attr.getName(); String getterName = "get" + StringUtils.capitalize(attrName); @@ -1476,6 +1371,8 @@ // if (<%=ref%> != null) { // tmp.addAll(<%=ref%>); // } + + addImport(outputAbstract, TopiaContextImplementor.class); body.append("" /*{ { @@ -1507,21 +1404,22 @@ }*/ ); - setOperationBody(op, body.length() == 0 ? " " : body.toString()); + setOperationBody(operation, body.length() == 0 ? " " : body.toString()); } - @Deprecated - protected void generateAggregateMethod(ObjectModelClass output, - ObjectModelClass clazz) { + protected void generateAggregateMethod(ObjectModelClass input) { - ObjectModelOperation op = addOperation(output, - "getAggregate", - List.class.getName() + '<' + TopiaEntity.class.getName() + '>', - ObjectModelModifier.PUBLIC); - addException(op, TopiaException.class); - addAnnotation(output, op, Override.class.getSimpleName()); - StringBuilder body = new StringBuilder(); - body.append("" + ObjectModelOperation operation = + addOperation(outputAbstract, "getAggregate", + List.class.getName() + '<' + TopiaEntity.class.getName() + '>'); + + addException(operation, TopiaException.class); + addAnnotation(outputAbstract, operation, Override.class.getSimpleName()); + + addImport(outputAbstract, ArrayList.class); + addImport(outputAbstract, List.class); + + StringBuilder body = new StringBuilder("" /*{ List<TopiaEntity> tmp = new ArrayList<TopiaEntity>(); @@ -1529,24 +1427,24 @@ // on les ajoute dans tmp }*/ ); - for (ObjectModelAttribute attr : clazz.getAttributes()) { + for (ObjectModelAttribute attr : input.getAttributes()) { + if (attr.referenceClassifier() && - attr.getClassifier().hasStereotype( - STEREOTYPE_ENTITY)) { - if (attr.isAggregate()) { - String attrName = attr.getName(); - String getterName = "get" + StringUtils.capitalize(attrName); - if (GeneratorUtil.isNMultiplicity(attr)) { - body.append("" + attr.getClassifier().hasStereotype(STEREOTYPE_ENTITY) && + attr.isAggregate()) { + + String attrName = attr.getName(); + String getterName = "get" + StringUtils.capitalize(attrName); + if (GeneratorUtil.isNMultiplicity(attr)) { + body.append("" /*{ tmp.addAll(<%=getterName%>()); }*/ - ); - } else { - body.append("" + ); + } else { + body.append("" /*{ tmp.add(<%=getterName%>()); }*/ - ); - } + ); } } } @@ -1564,104 +1462,36 @@ }*/ ); - setOperationBody(op, body.length() == 0 ? " " : body.toString()); + setOperationBody(operation, body.length() == 0 ? " " : body.toString()); } - @Deprecated - protected void generateAcceptMethod(ObjectModelClass output, - ObjectModelClass clazz) { + protected void generateI18nBlock(ObjectModelClass input) { - ObjectModelOperation op = addOperation(output, - "accept", - "void", - ObjectModelModifier.PUBLIC); - addException(op, TopiaException.class); - addAnnotation(output, op, Override.class.getSimpleName()); - setDocumentation(op, "Envoi via les methodes du visitor l'ensemble des " + - "champs de l'entity\n" + - "avec leur nom, type et valeur."); - { - ObjectModelParameter attr = addParameter(op, EntityVisitor.class, - "visitor"); - setDocumentation(attr, "le visiteur de l'entite."); + String i18nPrefix = TopiaGeneratorUtil.getI18nPrefix(input, model); + if (StringUtils.isEmpty(i18nPrefix)) { + return; } - StringBuilder body = new StringBuilder(); - body.append("" -/*{ - visitor.start(this); -}*/ - ); - for (ObjectModelAttribute attr : clazz.getAttributes()) { - ObjectModelAttribute reverse = attr.getReverseAttribute(); - // pour les asso quoi qu'il arrive il faut les lier des 2 cotes - // pour pouvoir supprimer en cascade l'asso lors de la suppression - // d'un des cotes - if (!(attr.isNavigable() - || hasUnidirectionalRelationOnAbstractType(reverse, model) - || attr.hasAssociationClass())) { - continue; - } + ObjectModelOperation block = + addBlock(outputAbstract, ObjectModelModifier.STATIC); - if (!attr.hasAssociationClass()) { - String attrType = TopiaGeneratorUtil.getSimpleName(attr.getType()); - String attrName = attr.getName(); - if (!GeneratorUtil.isNMultiplicity(attr)) { - body.append("" -/*{ visitor.visit(this, <%=getConstantName(attrName)%>, <%=attrType%>.class, <%=attrName%>); -}*/ - ); - } else { - String collectionType = TopiaGeneratorUtil.getSimpleName( - TopiaGeneratorUtil.getNMultiplicityInterfaceType( - attr)); - body.append("" -/*{ visitor.visit(this, <%=getConstantName(attrName)%>, <%=collectionType%>.class, <%=attrType%>.class, <%=attrName%>); -}*/ - ); - } - } else { - String assocAttrName = GeneratorUtil.getAssocAttrName(attr); - assocAttrName = GeneratorUtil.toLowerCaseFirstLetter(assocAttrName); - String assocClassFQN = TopiaGeneratorUtil.getSimpleName( - attr.getAssociationClass().getQualifiedName()); - if (!GeneratorUtil.isNMultiplicity(attr)) { - body.append("" -/*{ visitor.visit(this, <%=getConstantName(assocAttrName)%>, <%=assocClassFQN%>.class, <%=assocAttrName%>); -}*/ - ); - } else { - String collectionType = TopiaGeneratorUtil.getNMultiplicityInterfaceType(attr); - body.append("" -/*{ visitor.visit(this, <%=getConstantName(assocAttrName)%>, <%=collectionType%>.class, <%=assocClassFQN%>.class, <%=assocAttrName%>); -}*/ - ); - } + StringBuilder buffer = new StringBuilder(300); + addI18n(buffer, i18nPrefix, Introspector.decapitalize(input.getName())); + for (ObjectModelAttribute attr : input.getAttributes()) { + //TC-20100225 only treate navigable relations + if (attr.isNavigable()) { + addI18n(buffer, i18nPrefix, Introspector.decapitalize(attr.getName())); } } + setOperationBody(block, buffer.toString()); + } - //Déclaration des attributs d'une classe d'associations - if (clazz instanceof ObjectModelAssociationClass) { - ObjectModelAssociationClass assoc = (ObjectModelAssociationClass) clazz; - for (ObjectModelAttribute attr : assoc.getParticipantsAttributes()) { - if (attr != null) { - String attrType = TopiaGeneratorUtil.getSimpleName( - attr.getType()); - String attrName = attr.getName(); - attrName = GeneratorUtil.toLowerCaseFirstLetter(attrName); - body.append("" -/*{ visitor.visit(this, <%=getConstantName(attrName)%>, <%=attrType%>.class, <%=attrName%>); -}*/ - ); - } - } - } - body.append("" -/*{ visitor.end(this); -}*/ - ); - - setOperationBody(op, body.length() == 0 ? " " : body.toString()); + protected void addI18n(StringBuilder buffer, String i18nPrefix, + String suffix) { + buffer.append("\n org.nuiton.i18n.I18n.n_(\""); + buffer.append(i18nPrefix); + buffer.append(suffix); + buffer.append("\");"); } /** @@ -1692,30 +1522,6 @@ } } - private void generateI18n(ObjectModelClass result, String i18nPrefix, - ObjectModelClass clazz) { - - ObjectModelOperation block = addBlock(result, ObjectModelModifier.STATIC); - - StringBuilder buffer = new StringBuilder(300); - addI18n(buffer, i18nPrefix, Introspector.decapitalize(clazz.getName())); - for (ObjectModelAttribute attr : clazz.getAttributes()) { - //TC-20100225 only treate navigable relations - if (attr.isNavigable()) { - addI18n(buffer, i18nPrefix, Introspector.decapitalize(attr.getName())); - } - } - setOperationBody(block, buffer.toString()); - } - - private void addI18n(StringBuilder buffer, String i18nPrefix, - String suffix) { - buffer.append("\n org.nuiton.i18n.I18n.n_(\""); - buffer.append(i18nPrefix); - buffer.append(suffix); - buffer.append("\");"); - } - // ------------------------------------------------------------------------- // Helpers // -------------------------------------------------------------------------