Package org.openrewrite.java.search
Class FindMethods
- java.lang.Object
-
- org.openrewrite.Recipe
-
- org.openrewrite.java.search.FindMethods
-
public class FindMethods extends org.openrewrite.RecipeFinds matching method invocations.
-
-
Constructor Summary
Constructors Constructor Description FindMethods()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Set<J>find(J j, java.lang.String methodPattern)java.lang.StringgetDescription()java.lang.StringgetDisplayName()protected JavaVisitor<org.openrewrite.ExecutionContext>getSingleSourceApplicableTest()org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>getVisitor()-
Methods inherited from class org.openrewrite.Recipe
causesAnotherCycle, doNext, equals, getApplicableTest, getDescriptor, getEstimatedEffortPerOccurrence, getJacksonPolymorphicTypeTag, getLanguages, getName, getRecipeList, getTags, hashCode, noop, run, run, run, run, validate, validate, validateAll, validateAll, visit
-
-
-
-
Method Detail
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
public java.lang.String getDescription()
- Overrides:
getDescriptionin classorg.openrewrite.Recipe
-
getSingleSourceApplicableTest
protected JavaVisitor<org.openrewrite.ExecutionContext> getSingleSourceApplicableTest()
- Overrides:
getSingleSourceApplicableTestin classorg.openrewrite.Recipe
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
- Overrides:
getVisitorin classorg.openrewrite.Recipe
-
find
public static java.util.Set<J> find(J j, java.lang.String methodPattern)
- Parameters:
j- The subtree to search.methodPattern- A method pattern. SeeMethodMatcherfor details about this syntax.- Returns:
- A set of
J.MethodInvocationandJ.MemberReferencerepresenting calls to this method.
-
-