cfr
cfr copied to clipboard
Question: Is there any switch to specify a single class to be decompiled?
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.
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$"