简体   繁体   English

如何在参数为复合表达式的Java代码中查找方法的用法?

[英]How to find the usage of method in Java code where the arguments are compound expressions?

Probably a duplicate, but I don't know how to search for it.. 可能是重复的,但我不知道如何搜索。

I use IntelliJ to find method usages. 我使用IntelliJ查找方法用法。 Now I want to find these usages (method calls) where in the method call itself the argument is an expression. 现在,我想找到这些用法(方法调用),其中方法调用本身中的参数是一个表达式。

So not a reference to a string or a string literal as argument, but an expression that evaluates to one string. 因此,不是对字符串或字符串文字作为参数的引用,而是对一个字符串求值的表达式。

To clarify out of these three calls I only want to find the last one: 为了澄清这三个呼叫,我只想找到最后一个:

get(myString);
get('blabla');
get('blabla ' + myString);

I have been looking at IntelliJ's structural search, but I can't get there (quickly). 我一直在研究IntelliJ的结构搜索,但无法(迅速)到达那里。

I found it. 我找到了。 I used get($arg$+$arg2$) with the right template to search with 'Search Structurally'. 我使用带有正确模板的get($ arg $ + $ arg2 $)与“结构搜索”进行搜索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM