Class FindIndentYamlVisitor<P>


  • public class FindIndentYamlVisitor<P>
    extends YamlVisitor<P>
    Discover the most common indentation level of a tree, and whether this indentation is built with spaces or tabs.
    • Constructor Detail

      • FindIndentYamlVisitor

        public FindIndentYamlVisitor​(int enclosingIndent)
    • Method Detail

      • preVisit

        public Yaml preVisit​(Yaml tree,
                             P p)
        Overrides:
        preVisit in class org.openrewrite.TreeVisitor<Yaml,​P>
      • isIndentedWithSpaces

        public boolean isIndentedWithSpaces()
      • getMostCommonIndent

        public int getMostCommonIndent()
      • getTotalLines

        public int getTotalLines()
        Returns:
        The total number of source lines that this indent decision was made on.