Class IndentationDetector


public class IndentationDetector extends Object
Utility class for detecting the indentation style used in a compilation unit.
  • Method Details

    • detectIndentation

      public static org.apache.commons.lang3.tuple.Pair<Integer,​Boolean> detectIndentation(CtCompilationUnit cu)
      Detect the indentation style of the given compilation unit as 1, 2 or 4 spaces or tabs by inspecting the whitespace preceding type members of top-level type declarations.
      cu - A compilation unit.
      A pair on the form (indentationSize, isTabs)