简体   繁体   English

如何找到通过maven依赖导入的jar的用法?

[英]How to find the usage of a jar imported by maven dependency?

I have a Java project source code. 我有一个Java项目源代码。 It imported a jar library by maven dependency.I want to find where does this project used the method or class provided by the jar library. 它通过maven依赖项导入了一个jar库。我想找到这个项目在哪里使用了jar库提供的方法或类。 How can i do this? 我怎样才能做到这一点?

Remove the jar and see the compiler error can do this,but it cant show all usages,compiling will stop when it found an error.Any other way? 删除jar并查看编译器错误可以做到这一点,但是它不能显示所有用法,发现错误时编译将停止。还有其他方法吗?

As said in the comment, you can open the dependency to get the package name, for example: 如评论中所述,您可以打开依赖项以获取包名称,例如:

在此处输入图片说明

then use the default short cut ctrl shift f and enter the package name for global search: 然后使用默认的快捷键ctrl shift f并输入软件包名称以进行全局搜索:

在此处输入图片说明

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

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