Package org.openrewrite.xml.format
Class AutodetectGeneralFormatStyle
java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.xml.tree.Xml,P>
org.openrewrite.xml.XmlVisitor<org.openrewrite.xml.format.LineEndingsCount>
org.openrewrite.xml.format.AutodetectGeneralFormatStyle
public class AutodetectGeneralFormatStyle
extends org.openrewrite.xml.XmlVisitor<org.openrewrite.xml.format.LineEndingsCount>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.openrewrite.style.GeneralFormatStyle
autodetectGeneralFormatStyle
(org.openrewrite.xml.tree.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.@Nullable org.openrewrite.xml.tree.Xml
visit
(@Nullable org.openrewrite.Tree tree, org.openrewrite.xml.format.LineEndingsCount count) Methods inherited from class org.openrewrite.xml.XmlVisitor
autoFormat, autoFormat, autoFormat, getLanguage, isAcceptable, maybeAutoFormat, maybeAutoFormat, maybeAutoFormat, visitAttribute, visitAttributeValue, visitCharData, visitComment, visitDocTypeDecl, visitDocTypeDeclExternalSubsets, visitDocument, visitElement, visitIdent, visitJspDirective, visitProcessingInstruction, visitProlog, visitTag, visitTagClosing, visitXmlDecl
Methods inherited from class org.openrewrite.TreeVisitor
adapt, collect, collect, defaultValue, doAfterVisit, getAfterVisit, getCursor, isAdaptableTo, noop, postVisit, preVisit, reduce, reduce, reduce, setCursor, stopAfterPreVisit, updateCursor, visit, visit, visitAndCast, visitAndCast, visitMarker, visitMarkers, visitNonNull, visitNonNull, visitorTreeType
-
Constructor Details
-
AutodetectGeneralFormatStyle
public AutodetectGeneralFormatStyle()
-
-
Method Details
-
autodetectGeneralFormatStyle
public static org.openrewrite.style.GeneralFormatStyle autodetectGeneralFormatStyle(org.openrewrite.xml.tree.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
public @Nullable org.openrewrite.xml.tree.Xml visit(@Nullable org.openrewrite.Tree tree, org.openrewrite.xml.format.LineEndingsCount count) - Overrides:
visit
in classorg.openrewrite.TreeVisitor<org.openrewrite.xml.tree.Xml,
org.openrewrite.xml.format.LineEndingsCount>
-