Class InvocationMatcher.AdvancedInvocationMatcher

java.lang.Object
org.openrewrite.analysis.InvocationMatcher.AdvancedInvocationMatcher
Enclosing interface:
InvocationMatcher

public static final class InvocationMatcher.AdvancedInvocationMatcher extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAnyArgument(org.openrewrite.Cursor cursor)
     
    boolean
    isArgument(org.openrewrite.Cursor cursor, int argumentIndex)
    IMPORTANT NOTE: An argument is a value passed during function invocation.
    boolean
    isFirstArgument(org.openrewrite.Cursor cursor)
    IMPORTANT NOTE: An argument is a value passed during function invocation.
    boolean
    isFirstParameter(org.openrewrite.Cursor cursor)
    IMPORTANT NOTE: A parameter is a variable in a function definition.
    boolean
    isParameter(org.openrewrite.Cursor cursor, int parameterIndex)
    IMPORTANT NOTE: A parameter is a variable in a function definition.
    boolean
    isSelect(org.openrewrite.Cursor cursor)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.