Class MapTagChildrenVisitor<T>

java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.xml.tree.Xml,T>
org.openrewrite.xml.XmlVisitor<T>
org.openrewrite.xml.MapTagChildrenVisitor<T>

public class MapTagChildrenVisitor<T> extends org.openrewrite.xml.XmlVisitor<T>
Applies a transformation to the children of the specified tag.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    org.openrewrite.xml.tree.Xml.Tag
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openrewrite.xml.tree.Xml.Tag
    mapChildren(org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<Content> map)
    Transform the children of a tag with the supplied mapping function.
    static org.openrewrite.xml.tree.Xml.Tag
    mapChildren(org.openrewrite.xml.tree.Xml.Tag parentScope, org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<Content> map)
    Transform the children of a tag with the supplied mapping function.
    static org.openrewrite.xml.tree.Xml.Tag
    mapTagChildren(org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<org.openrewrite.xml.tree.Xml.Tag> map)
     
    static org.openrewrite.xml.tree.Xml.Tag
    mapTagChildren(org.openrewrite.xml.tree.Xml.Tag parentScope, org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<org.openrewrite.xml.tree.Xml.Tag> map)
     
    org.openrewrite.xml.tree.Xml
    visitTag(org.openrewrite.xml.tree.Xml.Tag tag, T ctx)
     

    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, 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, visit, visitAndCast, visitAndCast, visitMarker, visitMarkers, visitNonNull, visitNonNull, visitorTreeType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MapTagChildrenVisitor

      public MapTagChildrenVisitor()
  • Method Details

    • visitTag

      public org.openrewrite.xml.tree.Xml visitTag(org.openrewrite.xml.tree.Xml.Tag tag, T ctx)
      Overrides:
      visitTag in class org.openrewrite.xml.XmlVisitor<T>
    • mapChildren

      public static org.openrewrite.xml.tree.Xml.Tag mapChildren(org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<Content> map)
      Transform the children of a tag with the supplied mapping function.
      Parameters:
      parent - the tag whose direct child elements are to be transformed by 'map'.
      map - the function used to transform the direct child elements of 'parent'.
      Returns:
      'parent' with its children transformed by 'map'
    • mapChildren

      public static org.openrewrite.xml.tree.Xml.Tag mapChildren(org.openrewrite.xml.tree.Xml.Tag parentScope, org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<Content> map)
      Transform the children of a tag with the supplied mapping function.
      Parameters:
      parentScope - a tag which contains 'parent' as a direct or transitive child element.
      parent - the tag whose direct child elements are to be transformed by 'map'.
      map - the function used to transform the direct child elements of 'parent'.
      Returns:
      'parentScope' which somewhere contains 'parent' with its children transformed by 'map'
    • mapTagChildren

      public static org.openrewrite.xml.tree.Xml.Tag mapTagChildren(org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<org.openrewrite.xml.tree.Xml.Tag> map)
    • mapTagChildren

      public static org.openrewrite.xml.tree.Xml.Tag mapTagChildren(org.openrewrite.xml.tree.Xml.Tag parentScope, org.openrewrite.xml.tree.Xml.Tag parent, UnaryOperator<org.openrewrite.xml.tree.Xml.Tag> map)