Mikel
Mikel

Reputation: 460

Intellij Structural Search for param type and actual type

Imagine I want to search for all the methods with any number of parameters that accepts as one of them Collection but are called by passing a List. Example:

and I have:

Is there a way of using Structural search for that?

Upvotes: 4

Views: 730

Answers (1)

Bas Leijdekkers
Bas Leijdekkers

Reputation: 26462

If you want to find the calls to the methods, not the methods itself, you can use the following search template:

$call$($a$, $argument$, $b$)

With the following variable constraints:

a, b

  • Minimum count: 0
  • Maximum count: unlimited

argument

  • Text/RegExp for java expression type: List
  • Text/RegExp for formal argument type of the method: Collection

Upvotes: 1

Related Questions