简体   繁体   English

如何提取 java 方法调用?

[英]How can I extract the java method invocation?

Suppose in my project written in Java I have some classes and each of these classes has some methods.假设在我用 Java 编写的项目中,我有一些类,每个类都有一些方法。 I want to know which methods never invoked in my project.我想知道我的项目中从未调用过哪些方法。 I implemented a simple program by using a Parser to extact the name of all methods in my project through using the first line of method's definitions.我使用 Parser 实现了一个简单的程序,通过使用方法定义的第一行来提取项目中所有方法的名称。 But my question is that "Is there any parser or software to extract the method's invocation".但我的问题是“是否有任何解析器或软件来提取方法的调用”。

Oh my god.我的天啊。 Just use the IDE.只需使用 IDE。 Either IntelliJ Idea or Eclipse or NetBeans can do the search. IntelliJ Idea 或 Eclipse 或 NetBeans 都可以进行搜索。 Even Idea will grey out the unused methods.甚至 Idea 也会将未使用的方法变灰。 Also, uou can trigger the search by Alt + F7 keystroke on the method name.此外,你可以通过 Alt + F7 键击方法名称来触发搜索。

Project Jackpot is a tool to do this kind of transformation. Project Jackpot是进行这种转换的工具。 See this presentation for more information.有关更多信息,请参阅此演示文稿

It seems to have migrated to a separate project on bitbucket .它似乎已迁移到bitbucket上的单独项目。

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

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