Package org.openrewrite.xml.format
Class AutodetectGeneralFormatStyle
java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.xml.tree.Xml,org.openrewrite.xml.format.LineEndingsCount>
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openrewrite.style.GeneralFormatStyleautodetectGeneralFormatStyle(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.Xmlvisit(@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, visitJspComment, visitJspDeclaration, visitJspDirective, visitJspExpression, visitJspScriptlet, visitProcessingInstruction, visitProlog, visitTag, visitTagClosing, visitXmlDeclMethods 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:
visitin classorg.openrewrite.TreeVisitor<org.openrewrite.xml.tree.Xml,org.openrewrite.xml.format.LineEndingsCount>
-