Package org.eclipse.handly.util
Class IndentPolicy
- java.lang.Object
-
- org.eclipse.handly.util.IndentPolicy
-
public class IndentPolicy extends java.lang.Object
Encapsulates an indentation policy such as the indentation unit and line separator used.
-
-
Constructor Summary
Constructors Constructor Description IndentPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendIndent(java.lang.StringBuilder builder)
Appends an indentation unit to the given string builder.void
appendIndent(java.lang.StringBuilder builder, int n)
Appends the given number of indentation units to the given string builder.void
appendLine(java.lang.StringBuilder builder)
Appends a line separator to the given string builder.
-
-
-
Method Detail
-
appendIndent
public void appendIndent(java.lang.StringBuilder builder)
Appends an indentation unit to the given string builder.- Parameters:
builder
- a string builder (notnull
)
-
appendIndent
public void appendIndent(java.lang.StringBuilder builder, int n)
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
public void appendLine(java.lang.StringBuilder builder)
Appends a line separator to the given string builder.- Parameters:
builder
- a string builder (notnull
)
-
-