简体   繁体   中英

IntelliJ Idea structural search for implementations of all imported interface

I hava a JAVA (+ Spring) project with three modules: A, B and C. Module A and module B depends of module C, but they don't depends of each other. C has some interfaces which are implemented in module A or module B. Can I use structural search for searching for all Java classes which are in A, and implement's an interface from C, which is used in B? Is it some tool in Idea which can list me these classes?

Eg: Module A:

class MyInterfaceImpl implements MyInterface {
}
class MyNonImpl {
}

Module B:

interface MyInterface {
}

module C:

import mypackage.MyInterface;
class MyClass {
}

The search expression should find MyInterfaceImpl in this case.

Hitting Alt + F7 (Find usages) while having cursor on the interface will find all usages of that interface - all classes which implement it even across modules.

Usages in extends/implements clause.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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