Class AutodetectGeneralFormatStyle

java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.java.tree.J,org.openrewrite.java.format.LineEndingsCount>
org.openrewrite.java.JavaVisitor<org.openrewrite.java.format.LineEndingsCount>
org.openrewrite.java.JavaIsoVisitor<org.openrewrite.java.format.LineEndingsCount>
org.openrewrite.java.format.AutodetectGeneralFormatStyle

public class AutodetectGeneralFormatStyle extends JavaIsoVisitor<org.openrewrite.java.format.LineEndingsCount>
  • Constructor Details

    • AutodetectGeneralFormatStyle

      public AutodetectGeneralFormatStyle()
  • Method Details

    • autodetectGeneralFormatStyle

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

      public Space visitSpace(Space space, Space.Location loc, org.openrewrite.java.format.LineEndingsCount count)
      Overrides:
      visitSpace in class JavaVisitor<org.openrewrite.java.format.LineEndingsCount>