IntelliJ:通过签名查找方法 [英] IntelliJ: find method by signature
问题描述
我想知道是否有可能找到返回特定类型的对象的方法?
例如,我想在autocompletion中查看返回 String
的所有方法:
I wonder if it's possible to find method of object which returns specific type?
For example I want to look in autocompletion all methods which return String
:
对于此示例,很容易找到它通过向下滚动,但对于具有大量方法的对象,可能会很痛苦。
For this example it's easy to find it just by scrolling down, but for objects with large number of methods it can be painful.
推荐答案
实际上,即使在类结构视图中,也没有按返回类型(但是?)进行默认排序。
我正在使用智能完成(ctrl + shift + space)来实现仅接受某种类型的目的,例如:
Actually there is no default sorting by return type(yet?), even in class structure view. I'm using smart completion(ctrl+shift+space) for this purposes in place where only certain type is accepted, for example:
String s = aClass.<smart completion here>
它将显示来自 aClass
的方法在开头返回字符串
。
It will show methods from a aClass
that return String
at the beginning.
这篇关于IntelliJ:通过签名查找方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!