Class IndentPolicy

java.lang.Object
org.eclipse.handly.util.IndentPolicy

public class IndentPolicy extends Object
Encapsulates an indentation policy such as the indentation unit and line separator used.
  • Constructor Details

    • IndentPolicy

      public IndentPolicy()
  • Method Details

    • appendIndent

      public void appendIndent(StringBuilder builder)
      Appends an indentation unit to the given string builder.
      Parameters:
      builder - a string builder (not null)
    • appendIndent

      public void appendIndent(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 (not null)
      n - the number of indentation units to append
    • appendLine

      public void appendLine(StringBuilder builder)
      Appends a line separator to the given string builder.
      Parameters:
      builder - a string builder (not null)