Class CursorUtil

java.lang.Object
org.openrewrite.analysis.util.CursorUtil

public class CursorUtil extends Object
  • Constructor Details

    • CursorUtil

      public CursorUtil()
  • Method Details

    • findCallableBlockCursor

      public static fj.data.Option<org.openrewrite.Cursor> findCallableBlockCursor(org.openrewrite.Cursor start)
    • findCursorForTree

      @Incubating(since="2.4.0") public static fj.data.Option<org.openrewrite.Cursor> findCursorForTree(org.openrewrite.Cursor start, org.openrewrite.Tree tree)
      Find's a Cursor with a correctly constructed parent relationship for a given tree.
      Parameters:
      start - A cursor to start the search from
      tree - The tree to find a cursor instance for.
      Returns:
      An option containing the cursor instance if found, otherwise none.