Class AutodetectGeneralFormatStyle

java.lang.Object
org.openrewrite.TreeVisitor<Xml,P>
org.openrewrite.xml.XmlVisitor<org.openrewrite.xml.format.LineEndingsCount>
org.openrewrite.xml.format.AutodetectGeneralFormatStyle

public class AutodetectGeneralFormatStyle extends XmlVisitor<org.openrewrite.xml.format.LineEndingsCount>
  • Constructor Details

    • AutodetectGeneralFormatStyle

      public AutodetectGeneralFormatStyle()
  • Method Details

    • autodetectGeneralFormatStyle

      public static org.openrewrite.style.GeneralFormatStyle autodetectGeneralFormatStyle(Xml.Document x)
      Makes a best-effort attempt to determine whether windows-style (CRLF) line endings or unix-style (LF) are more common in the supplied AST.
    • visit

      @Nullable public @Nullable Xml visit(@Nullable @Nullable org.openrewrite.Tree tree, org.openrewrite.xml.format.LineEndingsCount count)
      Overrides:
      visit in class org.openrewrite.TreeVisitor<Xml,org.openrewrite.xml.format.LineEndingsCount>