@Override public String toString() { boolean isFirst = true; StringBuilder definitionBuilder = new StringBuilder("@").append(name).append("( "); if (elements != null && elements.size() > 0) { for (Element element : elements) { if (!isFirst) { definitionBuilder.append(", "); } else { isFirst = false; } definitionBuilder.append(element.toString()); } } if (annotations != null && annotations.size() > 0) { for (Annotation annotation : annotations) { if (!isFirst) { definitionBuilder.append(", "); } else { isFirst = false; } definitionBuilder.append(annotation.toString()); } } definitionBuilder.append(")"); return definitionBuilder.toString(); }
protected String toString(String type) { StringBuilder definitionBuilder = new StringBuilder(); if (annotations != null && annotations.size() > 0) { for (Annotation annotation : annotations) { definitionBuilder.append(annotation.toString()); } } definitionBuilder.append("define ").append(type).append(" ").append(id).append(" ("); boolean isFirst = true; for (Attribute attribute : attributeList) { if (!isFirst) { definitionBuilder.append(", "); } else { isFirst = false; } definitionBuilder.append(attribute.getName()).append(" "). append(attribute.getType().toString().toLowerCase(Locale.getDefault())); } definitionBuilder.append(")"); return definitionBuilder.toString(); } @Override
@Override public String toString() { boolean isFirst = true; StringBuilder definitionBuilder = new StringBuilder("@").append(name).append("( "); if (elements != null && elements.size() > 0) { for (Element element : elements) { if (!isFirst) { definitionBuilder.append(", "); } else { isFirst = false; } definitionBuilder.append(element.toString()); } } if (annotations != null && annotations.size() > 0) { for (Annotation annotation : annotations) { if (!isFirst) { definitionBuilder.append(", "); } else { isFirst = false; } definitionBuilder.append(annotation.toString()); } } definitionBuilder.append(")"); return definitionBuilder.toString(); }
protected String toString(String type) { StringBuilder definitionBuilder = new StringBuilder(); if (annotations != null && annotations.size() > 0) { for (Annotation annotation : annotations) { definitionBuilder.append(annotation.toString()); } } definitionBuilder.append("define ").append(type).append(" ").append(id).append(" ("); boolean isFirst = true; for (Attribute attribute : attributeList) { if (!isFirst) { definitionBuilder.append(", "); } else { isFirst = false; } definitionBuilder.append(attribute.getName()).append(" "). append(attribute.getType().toString().toLowerCase(Locale.getDefault())); } definitionBuilder.append(")"); return definitionBuilder.toString(); } @Override