Module org.eclipse.xtext.xbase.lib
Package org.eclipse.xtend2.lib
Interface StringConcatenationClient.TargetStringConcatenation
- All Superinterfaces:
CharSequence
- Enclosing class:
- StringConcatenationClient
A
StringConcatenationClient.TargetStringConcatenation models the public interface of a
StringConcatenation so implementations of the StringConcatenationClient
can append their content properly.- Since:
- 2.5
-
Method Summary
Modifier and TypeMethodDescriptionvoidAppend the string representation of the given object to this sequence.voidAdd the string representation of the given object to this sequence.voidappendImmediate(Object object, String indentation) Add the string representation of the given object to this sequence immediately.voidnewLine()Add a newline to this sequence according to the configured lineDelimiter.voidAdd a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, length, subSequence, toString
-
Method Details
-
newLineIfNotEmpty
void newLineIfNotEmpty()Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace. -
newLine
void newLine()Add a newline to this sequence according to the configured lineDelimiter. -
appendImmediate
Add the string representation of the given object to this sequence immediately. That is, all the trailing whitespace of this sequence will be ignored and the string is appended directly after the last segment that contains something besides whitespace. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation.- Parameters:
object- the to-be-appended object.indentation- the indentation string that should be prepended. May not benull.
-
append
Add the string representation of the given object to this sequence. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation.- Parameters:
object- the appended object.indentation- the indentation string that should be prepended. May not benull.
-
append
Append the string representation of the given object to this sequence. Does nothing if the object isnull.- Parameters:
object- the to-be-appended object.
-