Search Java jar (ear,war,...) files for class / method
I am looking for a tool where I can search several jar, war, ... files for a certain class and method (even better Signature).
So far I have found tools such as JavaClassFinder where I can search for j开发者_C百科ava files and classes. What I would need is to search for methods / signatures as well... I am looking for an existing solution, I do not want to write my own tool.
Example: MyMethod should find all MyMethod methods
Any ideas, suggestions?
---- Edit 2014/March -----
See https://stackoverflow.com/a/23112227/356726
I don't know about a standalone tool, but if you create a simple Java project in Eclipse and add the jar, war, etc files to that, you can use the "Java Search" search dialog in Eclipse.
This does exactly what your want and among others has an option to search for methods, and even allows you to filter those on references or declarations.
Alternatively you do have to build something yourself, although you could always use an existing tool as a start, like JavaClassFinder you mentioned or JBoss Tattletale.
I just wrote a small (OpenSource) text search utility for JAVA archive files. It can cover your requirement to some extend.
EAR Search can be downloaded from http://sourceforge.net/projects/earsearch
By chance another comitter in another question has left a link to http://code.google.com/p/reflections/ (honour to this link). THis would help if you need to do this at runtime.
精彩评论