protected String _getStringRepresentation(final Object object) { return super.getStringRepresentation(object); }
protected void append(Object object, int index) { if (object == null) return; if (object instanceof String) { append((String) object, index); } else if (object instanceof StringConcatenation) { StringConcatenation other = (StringConcatenation) object; appendSegments(index, other.getSignificantContent(), other.lineDelimiter); } else if (object instanceof StringConcatenationClient) { StringConcatenationClient other = (StringConcatenationClient) object; other.appendTo(new SimpleTarget(this, index)); } else { final String text = getStringRepresentation(object); if (text != null) { append(text, index); } } }
other.appendTo(new IndentedTarget(this, indentation, index)); } else { String value = getStringRepresentation(object); List<String> newSegments = splitLinesAndNewLines(value); appendSegments(indentation, index, newSegments, lineDelimiter);
other.appendTo(new IndentedTarget(this, indentation, index)); } else { final String text = getStringRepresentation(object); if (text != null) { append(indentation, text, index);
/** * Add the string representation of the given object to this sequence at the given index. Does nothing if the object * is <code>null</code>. * * @param object * the to-be-appended object. * @param index * the index in the list of segments. */ protected void append(Object object, int index) { if (object == null) return; if (object instanceof StringConcatenation) { StringConcatenation other = (StringConcatenation) object; appendSegments(index, other.getSignificantContent(), other.lineDelimiter); return; } else if (object instanceof StringConcatenationClient) { StringConcatenationClient other = (StringConcatenationClient) object; other.appendTo(new SimpleTarget(this, index)); return; } else { String value = getStringRepresentation(object); List<String> newSegments = splitLinesAndNewLines(value); appendSegments(index, newSegments, lineDelimiter); } }