Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is there any switch to specify a single class to be decompiled? #343

Open
drori200 opened this issue May 11, 2023 · 1 comment
Labels

Comments

@drori200
Copy link

Got a situation where i need to decompile only a specific class, looking at the switches and their descriptions the only thing that works like what I need is jarfilter but i don't know how to specify the regex for a single class.
doing `--jarfilter "com.example.className" or "com.example.className.class" do not work.

@leibnitz27
Copy link
Owner

You might get additional classes because the argument is a regex not a simple string

C:\code\cfr\target\classes>java -jar c:\Downloads\cfr-0.135.jar --help jarfilter
CFR 0.135

'jarfilter':

Substring regex - analyse only classes where the fqn matches this pattern. (when analysing jar).

Range : string


i.e. org.benf.(foo|bar).Bob would match multiple classes. (and strictly speaking the dot will match any character, but hey laziness ;) )

I suspect what you're hitting is

org.benf.cfr.reader.bytecode.CodeAnalyser

will match

org.benf.cfr.reader.bytecode.CodeAnalyserWholeClass

because it's a regex, you can just anchor it.

--jarfilter "^org.benf.cfr.reader.bytecode.CodeAnalyser$"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants