Package org.openrewrite.analysis
Interface BasicInvocationMatcher
- All Superinterfaces:
InvocationMatcher
- All Known Subinterfaces:
GenericExternalModel
Allows for the creation of an
InvocationMatcher by implementing four simple predicates.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openrewrite.analysis.InvocationMatcher
InvocationMatcher.AdvancedInvocationMatcher -
Method Summary
Modifier and TypeMethodDescriptionbooleandefault booleanmatches(org.openrewrite.java.tree.JavaType.Method type) Whether the method invocation or constructor matches the criteria of this matcher.booleanmatchesMethodName(String methodName) booleanmatchesParameterTypes(List<org.openrewrite.java.tree.JavaType> parameterTypes) default booleanmatchesTargetType(org.openrewrite.java.tree.JavaType.FullyQualified type) booleanmatchesTargetTypeName(String fullyQualifiedTypeName) Methods inherited from interface org.openrewrite.analysis.InvocationMatcher
advanced, matches, matches
-
Method Details
-
isMatchOverrides
boolean isMatchOverrides()- Returns:
- True if this method matcher should match on overrides of the target type.
-
matchesTargetTypeName
-
matchesMethodName
-
matchesParameterTypes
-
matches
default boolean matches(@Nullable org.openrewrite.java.tree.JavaType.Method type) Description copied from interface:InvocationMatcherWhether the method invocation or constructor matches the criteria of this matcher.- Specified by:
matchesin interfaceInvocationMatcher- Parameters:
type- The type of the method invocation or constructor.- Returns:
- True if the invocation or constructor matches the criteria of this matcher.
-
matchesTargetType
default boolean matchesTargetType(@Nullable org.openrewrite.java.tree.JavaType.FullyQualified type) - Parameters:
type- The declaring type of the method invocation or constructor.- Returns:
- True if the declaring type matches the criteria of this matcher.
-