Class InvocationMatcher.AdvancedInvocationMatcher
- Enclosing interface:
- InvocationMatcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAnyArgument(org.openrewrite.Cursor cursor) booleanisArgument(org.openrewrite.Cursor cursor, int argumentIndex) IMPORTANT NOTE: An argument is a value passed during function invocation.booleanisFirstArgument(org.openrewrite.Cursor cursor) IMPORTANT NOTE: An argument is a value passed during function invocation.booleanisFirstParameter(org.openrewrite.Cursor cursor) IMPORTANT NOTE: A parameter is a variable in a function definition.booleanisParameter(org.openrewrite.Cursor cursor, int parameterIndex) IMPORTANT NOTE: A parameter is a variable in a function definition.booleanisSelect(org.openrewrite.Cursor cursor)
-
Constructor Details
-
AdvancedInvocationMatcher
public AdvancedInvocationMatcher()
-
-
Method Details
-
isSelect
public boolean isSelect(org.openrewrite.Cursor cursor) -
isAnyArgument
public boolean isAnyArgument(org.openrewrite.Cursor cursor) -
isFirstArgument
public boolean isFirstArgument(org.openrewrite.Cursor cursor) IMPORTANT NOTE: An argument is a value passed during function invocation.By contrast, a parameter is a variable in a function definition. It is a placeholder and hence does not have a concrete value.
This method looks at arguments, not parameters.
This method is most useful when looking for the first argument passed to a varargs method.
-
isArgument
public boolean isArgument(org.openrewrite.Cursor cursor, int argumentIndex) IMPORTANT NOTE: An argument is a value passed during function invocation.By contrast, a parameter is a variable in a function definition. It is a placeholder and hence does not have a concrete value.
This method looks at arguments, not parameters.
This method is most useful when looking for a given argument passed to a varargs method.
-
isFirstParameter
public boolean isFirstParameter(org.openrewrite.Cursor cursor) IMPORTANT NOTE: A parameter is a variable in a function definition. It is a placeholder and hence does not have a concrete value.By contrast, an argument is a value passed during function invocation.
This method looks at parameters, not arguments.
-
isParameter
public boolean isParameter(org.openrewrite.Cursor cursor, int parameterIndex) IMPORTANT NOTE: A parameter is a variable in a function definition. It is a placeholder and hence does not have a concrete value.By contrast, an argument is a value passed during function invocation.
This method looks at parameters, not arguments.
-