Package org.eclipse.handly.util
Class IndentPolicy
java.lang.Object
org.eclipse.handly.util.IndentPolicy
Encapsulates an indentation policy such as the indentation unit
and line separator used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendIndent(StringBuilder builder) Appends an indentation unit to the given string builder.voidappendIndent(StringBuilder builder, int n) Appends the given number of indentation units to the given string builder.voidappendLine(StringBuilder builder) Appends a line separator to the given string builder.
-
Constructor Details
-
IndentPolicy
public IndentPolicy()
-
-
Method Details
-
appendIndent
Appends an indentation unit to the given string builder.- Parameters:
builder- a string builder (notnull)
-
appendIndent
Appends the given number of indentation units to the given string builder.This implementation calls
appendIndent(StringBuilder)the specified number of times.- Parameters:
builder- a string builder (notnull)n- the number of indentation units to append
-
appendLine
Appends a line separator to the given string builder.- Parameters:
builder- a string builder (notnull)
-