Package org.openrewrite.analysis.util
Class CursorUtil
java.lang.Object
org.openrewrite.analysis.util.CursorUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic fj.data.Option<org.openrewrite.Cursor>findCallableBlockCursor(org.openrewrite.Cursor start) static fj.data.Option<org.openrewrite.Cursor>findCursorForTree(org.openrewrite.Cursor start, org.openrewrite.Tree tree) Find's aCursorwith a correctly constructed parent relationship for a given tree.
-
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 aCursorwith a correctly constructed parent relationship for a given tree.- Parameters:
start- A cursor to start the search fromtree- The tree to find a cursor instance for.- Returns:
- An option containing the cursor instance if found, otherwise none.
-