CFRとは
java
コマンドが使用できる環境であれば、 にこれを指定することで、クラスファイルをデコンパイルしてソースファイルの情報を得ることができます。
- サイト :
- GitHub:
基本的な使い方
事前準備
まずは cfr-x.xxx.jar
をダウンロードします。ここでは最新バージョンの cfr-0.152.jar
を使用し、以降のコマンド例を記載していきます。
続いて、このJARファイルをオプションに指定して実行するため、java
コマンドを使用できるようにしておきます。$ java -version
を実行し、1.6以上のJavaバージョンが出力されていれば問題ありません。
java
コマンドを実行できるようにするための具体的な手順はこちらです。CFRはサイトでも言及されている通りJava6で記述されており、JARの実行は6以上のJava実行環境があれば可能です。
CFR will decompile modern Java features – up to and
, & , but is written entirely in Java 6, so will work anywhere!
CFRは最新のJava機能( , , の )をデコンパイルしますが、完全にJava6で記述されているため、どこでも動作します!
そのため例えば次のように、Java21でコンパイルされたcfr-0.152.jar
を指定してデコンパイルすることは可能です。
# Javaのバージョンは1.6
$ java -version
java version "1.6.0_06-p"
Java(TM) SE Runtime Environment (build 1.6.0_06-p-b04)
Java HotSpot(TM) 64-Bit Server VM (build 13.0-b04, mixed mode)
# クラスファイルのバージョンは65.0(Java21)のため実行できない
$ java com.example.Main
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/example/Main : Unsupported major.minor version 65.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
# CFRはJava1.6でも使用できるためデコンパイル可能
$ java -jar cfr-0.152.jar com.example.Main
/*
* Decompiled with CFR 0.152.
*/
package com.example;
public class Main {
public static void main(String[] stringArray) {
System.out.println("Hello World");
}
}
ダウンロードしたJARファイルをjava
コマンドで実行し、CFRの --version
オプションを指定します。CFRのバージョンが出力されれば、CFRでデコンパイルを実行するための事前準備は完了です。
# javaコマンドのjarオプションにcfr-0.152.jarを指定する
# さらにcfr-0.152.jarのオプションに--versionを指定する
$ java -jar cfr-0.152.jar --version
CFR 0.152
# 上記コマンドはcfr-0.152.jarをダウンロードしたディレクトリで実行する
# カレントディレクトリにcfr-0.152.jarが無い場合はパスを含めて指定する
$ java -jar C:\Users\xxx\Downloads\cfr-0.152.jar --version
CFR 0.152
# CFRのバージョンが出力されれば事前準備は完了
$ java -jar cfr-0.152.jar --version
CFR 0.152
デコンパイル実行
デコンパイルを実行するには、cfr-0.152.jar
の引数に対象のクラスファイル(または完全修飾クラス名)を指定します。
# 引数に対象のクラスファイルを指定してデコンパイル実行
$ java -jar cfr-0.152.jar Main.class
/*
* Decompiled with CFR 0.152.
*/
public class Main {
public static void main(String[] stringArray) {
System.out.println("Hello World");
}
}
# 引数に完全修飾クラス名を指定してデコンパイル実行
$ java -jar cfr-0.152.jar com.example.Main
/*
* Decompiled with CFR 0.152.
*/
package com.example;
public class Main {
public static void main(String[] stringArray) {
System.out.println("Hello World");
}
}
デフォルトではデコンパイル結果が標準出力に表示されます。--outputdir
オプションに任意のディレクトリを指定することで、ソースファイル( .java
)として結果を出力することができます。
# 引数未指定の場合は標準出力に結果表示
$ java -jar cfr-0.152.jar Main.class
/*
* Decompiled with CFR 0.152.
*/
package com.example;
public class Main {
public static void main(String[] stringArray) {
System.out.println("Hello World");
}
}
# --outputdir オプションに任意のディレクトリを指定
# → .\result\com\example\Main.java が作成される
$ java -jar cfr-0.152.jar Main.class --outputdir result
Processing com.example.Main
また、デコンパイル対象には単一のクラスファイルの他、JARファイルを指定することも可能です。この場合、含まれる全てのクラスファイルが順にデコンパイルされ、デフォルトでは大量のソースファイル情報が標準出力に次々と流れていってしまうことになるため、対象にJARを指定することでデコンパイルするクラスファイルが多数に及ぶ場合は、--outputdir
オプションを指定しておくほうが賢明です。
# デフォルトは標準出力のため表示が埋め尽くされてしまう
$ java -jar cfr-0.152.jar lib\commons-lang3-3.17.0.jar
/*
* Decompiled with CFR 0.152.
*/
package org.apache.commons.lang3;
import java.lang.annotation.Annotation;
・・・略・・・
import org.apache.commons.lang3.exception.UncheckedException;
public class AnnotationUtils {
・・・略・・・
}
/*
* Decompiled with CFR 0.152.
*/
package org.apache.commons.lang3;
import java.io.IOException;
・・・略・・・
import org.apache.commons.lang3.function.FailableBiConsumer;
public final class AppendableJoiner<T> {
・・・略・・・
}
/*
* Decompiled with CFR 0.152.
*/
package org.apache.commons.lang3;
import java.util.HashMap;
・・・略・・・
import org.apache.commons.lang3.stream.Streams;
public class ArchUtils {
}
・・・略・・・
# --outputdir オプションを指定することで出力を抑制しつつ同じディレクトリ構成のソースファイル一式を得られる
$ java -jar cfr-0.152.jar commons-lang3-3.17.0.jar --outputdir commons-lang3-3.17.0
Processing commons-lang3-3.17.0.jar (use silent to silence)
Processing org.apache.commons.lang3.AnnotationUtils
Processing org.apache.commons.lang3.AppendableJoiner
Processing org.apache.commons.lang3.ArchUtils
・・・略・・・
Processing org.apache.commons.lang3.tuple.Pair
Processing org.apache.commons.lang3.tuple.Triple
Processing org.apache.commons.lang3.tuple.package-info
Processing org.apache.commons.lang3.util.FluentBitSet
Processing org.apache.commons.lang3.util.package-info
Processing module-info
# ↓
# .\commons-lang3-3.17.0
# ├ META-INF
# │ └ ...
# ├ org
# │ └ apache
# │ └ commons
# │ └ lang3
# │ ├ ...
# │ ├ util
# │ │ └ ...
# │ ├ ...
# │ ├ AnnotationUtils.java
# │ ├ AppendableJoiner.java
# │ ├ ArchUtils.java
# │ └ ...
# └ summary.txt
- クラスファイルのデコンパイル
$ java -jar cfr-0.152.jar <クラスファイル>
$ java -jar cfr-0.152.jar <完全修飾クラス名>
$ java -jar cfr-0.152.jar <クラスファイル> --outputdir <ディレクトリパス>
- JARファイルのデコンパイル
$ java -jar cfr-0.152.jar <JARファイル>
$ java -jar cfr-0.152.jar <JARファイル> --outputdir <ディレクトリパス>
その他のオプション
CFRで指定可能な全ての引数の一覧は --help
オプションで確認できます。また、--help
に続けてさらに任意の引数を指定することで、その詳細を確認することができます。
# --helpオプションで引数を一覧表示(最終行に詳細確認方法も出力される)
$ java -jar cfr-0.152.jar --help
CFR 0.152
--aexagg (boolean)
--aexagg2 (boolean)
・・・略・・・
--usesignatures (boolean) default: true
--version (boolean) default: true
--help (string)
Please specify '--help optionname' for specifics, e.g.
詳細については「--help optionname」を指定してください。例:
--help pullcodecase
例えば --help
での一覧表示では、--aexagg
は (boolean)
としか情報が出力されていませんが、--help
に続けて具体的な引数名を指定することでその詳細が出力されます。
$ java -jar cfr-0.152.jar --help aexagg
CFR 0.152
'aexagg':
Try to extend and merge exceptions more aggressively
例外をより積極的に拡張および統合する
Range : boolean
- 指定可能な引数の一覧を表示
$ java -jar cfr-0.152.jar --help
- 引数の詳細を表示
$ java -jar cfr-0.152.jar --help <引数名>
--help
オプションで一覧表示される引数それぞれの詳細は次の通りです。(※ CFR 0.152)
Arguments | Range | Default | Specifics |
---|---|---|---|
--aexagg | boolean | – | Try to extend and merge exceptions more aggressively 例外をより積極的に拡張および統合します |
--aexagg2 | boolean | – | Try to extend and merge exceptions more aggressively (may change semantics) 例外をより積極的に拡張およびマージします(セマンティクスが変わる可能性があります) |
--aggressivedocopy | int >= 0 | 0 | Clone code from impossible jumps into loops with ‘first’ test 不可能なジャンプからループへのコードを「最初の」テストでクローンします |
--aggressivedoextension | boolean | – | Fold impossible jumps into do loops with ‘first’ test 不可能なジャンプを「first」テストで do ループに折り込みます |
--aggressiveduff | boolean | – | Fold duff device style switches with additional control. 追加のコントロールを備えたダフデバイス形式のスイッチを折りたたみます。 |
--aggressivesizethreshold | int >= 0 | 13000 | Opcode count at which to trigger aggressive reductions 積極的な削減をトリガーするオペコード数です |
--allowcorrecting | boolean | true | Allow transformations which correct errors, potentially at the cost of altering emitted code behaviour. An example would be removing impossible (in java!) exception handling – if this has any effect, a warning will be emitted. エラーを修正する変換を許可しますが、生成されるコードの動作が変更される可能性があります。例えば、Javaでは不可能な例外処理を削除することが挙げられます。この処理が何らかの影響を与える場合は、警告が出力されます。 |
--allowmalformedswitch | boolean | – | Allow potentially malformed switch statements 不正な形式の可能性があるスイッチ文を許可します |
--analyseas | One of ...One of [DETECT, JAR, WAR, CLASS] | – | Force file to be analysed as ‘jar’ or ‘class’ ファイルを「jar」または「class」として強制的に分析します |
--antiobf | boolean | false | Undo various obfuscations さまざまな難読化を元に戻します |
--arrayiter | boolean | true if ...true if class file from version 49.0 (Java 5) or greater | Re-sugar array based iteration 配列ベースのイテレーションを元の糖衣構文に復元します |
--caseinsensitivefs | boolean | true | Cope with case insensitive file systems by renaming colliding classes 大文字と小文字を区別しないファイルシステムに対応するため衝突するクラスの名前を変更します |
--clobber | boolean | – | Overwrite files when using option ‘outputpath’ オプション「outputpath」を使用する際にファイルを上書きします |
--collectioniter | boolean | true if ...true if class file from version 49.0 (Java 5) or greater | Re-sugar collection based iteration コレクションベースのイテレーションを元の糖衣構文に復元します |
--commentmonitors | boolean | false | Replace monitors with comments – useful if we’re completely confused モニターをコメントに置き換えます。これはデコンパイラが完全に混乱した場合に便利です。 |
--comments | boolean | true | Output comments describing decompiler status, fallback flags etc. デコンパイラのステータスやフォールバックフラグなどを説明するコメントを出力します。 |
--constobf | boolean | Value of ...Value of option 'antiobf' | Undo constant obfuscation 定数の難読化を元に戻します |
--decodeenumswitch | boolean | true if ...true if class file from version 49.0 (Java 5) or greater | Re-sugar switch on enum – see https://benf.org/other/cfr/switch-on-enum.html enum に対する switch 文を元の構文に復元します。詳細は https://benf.org/other/cfr/switch-on-enum.html を参照してください。 |
--decodefinally | boolean | true | Re-sugar finally statements finally 文を元の構文に復元します |
--decodelambdas | boolean | true if ...true if class file from version 52.0 (Java 8) or greater | Re-build lambda functions ラムダ関数を再構築します |
--decodestringswitch | boolean | true if ...true if class file from version 51.0 (Java 7) or greater | Re-sugar switch on String – see https://benf.org/other/cfr/java7switchonstring.html String に対する switch 文を元の構文に復元します。詳細は https://benf.org/other/cfr/java7switchonstring.html を参照してください。 |
--dumpclasspath | boolean | false | Dump class path for debugging purposes デバッグ目的でクラスパスをダンプします |
--eclipse | boolean | true | Enable transformations to handle Eclipse code better Eclipse のコードをより適切に処理するための変換を有効にします |
--elidescala | boolean | false | Elide things which aren’t helpful in scala output (serialVersionUID, @ScalaSignature) Scala の出力で役立たないもの(例: serialVersionUID, @ScalaSignature)を省略します |
--extraclasspath | string | – | additional class path – classes in this classpath will be used if needed. 追加のクラスパスを指定します。このクラスパス内のクラスが必要に応じて使用されます。 |
--forbidanonymousclasses | boolean | false | Don’t allow anonymous classes. Note – this will NOT be used as a fallback, it must be specified. It will produce odd code. 無名クラスを許可しません。注意:これはフォールバックとして使用されず、明示的に指定する必要があります。奇妙なコードが生成される可能性があります。 |
--forbidmethodscopedclasses | boolean | false | Don’t allow method scoped classes. Note – this will NOT be used as a fallback, it must be specified. It will produce odd code. メソッドスコープのクラスを許可しません。注意:これはフォールバックとして使用されず、明示的に指定する必要があります。 |
--forceclassfilever | string, ...string, specifying either java version as 'j6', 'j1.0', or classfile as '56', '56.65535' List of known versions: j1.0 : 45.3 (Java 1.0) | – | Force the version of the classfile (and hence java) that classfiles are decompiled as. Normally detected from class files. –help forceclassfilever for details. クラスファイルをデコンパイルする際のクラスファイル(およびJava)のバージョンを強制します。通常はクラスファイルから自動検出されます。詳細は –help forceclassfilever を参照してください。 |
--forcecondpropagate | boolean | – | Pull results of deterministic jumps back through some constant assignments 決定論的なジャンプの結果を、いくつかの定数代入を通じて引き戻します |
--forceexceptionprune | boolean | – | Remove nested exception handlers if they don’t change semantics ネストされた例外ハンドラがセマンティクスを変更しない場合それらを削除します |
--forcereturningifs | boolean | – | Move return up to jump site return 文をジャンプ元の位置に移動します |
--forcetopsort | boolean | – | Force basic block sorting. Usually not necessary for code emitted directly from javac, but required in the case of obfuscation (or dex2jar!). Will be enabled in recovery. 基本ブロックのソートを強制します。javacから直接出力されたコードでは通常不要ですが、難読化(またはdex2jar)の場合は必須です。リカバリ時に有効になります。 |
--forcetopsortaggress | boolean | – | Force extra aggressive topsort options さらに積極的なトップソートオプションを強制します |
--forcetopsortnopull | boolean | – | Force topsort not to pull try blocks トップソートがtryブロックをプルしないように強制します |
--forloopaggcapture | boolean | – | Allow for loops to aggressively roll mutations into update section, even if they don’t appear to be involved with the predicate forループが述語に関与していないように見えても、更新セクションに積極的にミューテーションを組み込むことを許可します |
--hidebridgemethods | boolean | Value of ...Value of option 'obfattr' | Hide bridge methods ブリッジメソッドを隠します |
--hidelangimports | boolean | true | Hide imports from java.lang. java.langからのインポートを隠します。 |
--hidelongstrings | boolean | false | Hide very long strings – useful if obfuscators have placed fake code in strings 非常に長い文字列を隠します。これは、難読化ツールが偽のコードを文字列に配置している場合に役立ちます。 |
--hideutf | boolean | true | Hide UTF8 characters – quote them instead of showing the raw characters UTF8文字を隠し、生の文字を表示する代わりに引用符で囲みます。 |
--ignoreexceptions | boolean | false | Drop exception information if completely stuck (WARNING : changes semantics, dangerous!) 完全にスタックした場合に例外情報を破棄します(警告:セマンティクスが変更され、危険です!) |
--ignoreexceptionsalways | boolean | false | Drop exception information (WARNING : changes semantics, dangerous!) 例外情報を破棄します(警告:セマンティクスが変更され、危険です!) |
--importfilter | string | – | Substring regex – import classes only when fqn matches this pattern. (VNegate with !, eg !lang) 部分文字列正規表現 – fqn がこのパターンに一致する場合にのみクラスをインポートします。(! を使用した VNegate、例: !lang) |
--innerclasses | boolean | true | Decompile inner classes 内部クラスをデコンパイルします |
--instanceofpattern | boolean | true if ...true if class file from version 60.0 (Java 16) or greater, or experimental in 58.0 (Java 14), 59.0 (Java 15) | Re-sugar instanceof pattern matches instanceofパターンマッチを元の糖衣構文に復元します |
--j14classobj | boolean | false if ...false if class file from version 49.0 (Java 5) or greater | Reverse java 1.4 class object construction Java1.4のクラスオブジェクト構築を逆コンパイルします |
--jarfilter | string | – | Substring regex – analyse only classes where the fqn matches this pattern. (when analysing jar) 部分文字列正規表現 – fqn がこのパターンに一致するクラスのみを分析します。(jar を分析する場合) |
--labelledblocks | boolean | true | Allow code to be emitted which uses labelled blocks, (handling odd forward gotos) ラベル付きブロックを使用するコードの生成を許可します(奇妙な前方 goto を処理します) |
--lenient | boolean | false | Be a bit more lenient in situations where we’d normally throw an exception 通常であれば例外をスローするような状況でも少し寛容になります |
--liftconstructorinit | boolean | true | Lift initialisation code common to all constructors into member initialisation すべてのコンストラクタに共通の初期化コードをメンバーの初期化に引き上げます |
--lomem | boolean | false | Be more agressive about uncaching in order to reduce memory footprint メモリ使用量を削減するために、キャッシュ解除をより積極的に行います |
--methodname | string | – | Name of method to analyse 分析するメソッドの名前を指定します |
--obfattr | boolean | Value of ...Value of option 'antiobf' | Undo attribute obfuscation 属性の難読化を元に戻します |
--obfcontrol | boolean | Value of ...Value of option 'antiobf' | Undo control flow obfuscation 制御フローの難読化を元に戻します |
--obfuscationpath | string | – | Path to obfuscation symbol remapping file 難読化シンボル再マッピングファイルへのパスを指定します |
--outputdir | string | – | Decompile to files in [directory] (= options ‘outputpath’ + ‘clobber’) (historic compatibility) [ディレクトリ] 内のファイルに逆コンパイルします(=オプション ‘outputpath’ + ‘clobber’)(歴史的な互換性のためのオプション) |
--outputencoding | string | – | saving decompiled files with specified encoding [encoding] 指定したエンコーディング [encoding] で逆コンパイルされたファイルを保存します |
--outputpath | string | – | Decompile to files in [directory] 指定された [directory] にファイルを逆コンパイルします |
--override | boolean | true if ...true if class file from version 50.0 (Java 6) or greater | Generate @Override annotations (if method is seen to implement interface method, or override a base class method) @Override アノテーションを生成します(メソッドがインターフェースメソッドを実装しているか、基本クラスメソッドをオーバーライドしている場合) |
--previewfeatures | boolean | true | Decompile preview features if class was compiled with ‘javac –enable-preview’ クラスが ‘javac –enable-preview’ でコンパイルされている場合プレビュー機能を逆コンパイルします |
--pullcodecase | boolean | false | Pull code into case statements agressively 積極的にコードを case 文に組み込みます |
--recordtypes | boolean | true if ...true if class file from version 60.0 (Java 16) or greater, or experimental in 58.0 (Java 14), 59.0 (Java 15) | Re-sugar record types レコード型を元の糖衣構文に復元します |
--recover | boolean | true | Allow more and more aggressive options to be set if decompilation fails デコンパイルに失敗した場合に、より積極的なオプションの設定を許可します |
--recovertypeclash | boolean | – | Split lifetimes where analysis caused type clash 分析によって型の衝突が発生した箇所のライフタイムを分割します |
--recovertypehints | boolean | – | Recover type hints for iterators from first pass 最初のパスからイテレータの型ヒントを回復します |
--reducecondscope | boolean | – | Reduce the scope of conditionals, possibly generating more anonymous blocks 条件式のスコープを縮小し、より多くの匿名ブロックを生成する可能性があります |
--relinkconst | boolean | true | Relink constants – if there is an inlined reference to a field, attempt to de-inline. 定数を再リンクします。フィールドへのインライン参照がある場合、非インライン化を試みます。 |
--relinkconststring | boolean | Value of ...Value of option 'relinkconst' | Relink constant strings – if there is a local reference to a string which matches a static final, use the static final. 定数文字列を再リンクします。静的finalに一致する文字列へのローカル参照がある場合、静的finalを使用します。 |
--removebadgenerics | boolean | true | Hide generics where we’ve obviously got it wrong, and fallback to non-generic 明らかに間違っているジェネリクスを隠し、非ジェネリックにフォールバックします |
--removeboilerplate | boolean | true | Remove boilderplate functions – constructor boilerplate, lambda deserialisation etc. ボイラープレート関数(コンストラクタ定型関数、ラムダ式デシリアライゼーションなど)を削除します。 |
--removedeadconditionals | boolean | – | Remove code that can’t be executed. 実行できないコードを削除します。 |
--removedeadmethods | boolean | true | Remove pointless methods – default constructor etc. 無意味なメソッド(デフォルトコンストラクタなど)を削除します。 |
--removeinnerclasssynthetics | boolean | true | Remove (where possible) implicit outer class references in inner classes 内部クラス内の暗黙的な外部クラス参照を(可能な場合は)削除します |
--rename | boolean | false | Synonym for ‘renamedupmembers’ + ‘renameillegalidents’ + ‘renameenumidents’ 「renamedupmembers」+「renameillegalidents」+「renameenumidents」の同義語です |
--renamedupmembers | boolean | Value of ...Value of option 'rename' | Rename ambiguous/duplicate fields. Note – this WILL break reflection based access, so is not automatically enabled. 曖昧/重複フィールドの名前を変更します。注意:これによりリフレクションベースのアクセスが中断されるため、自動的には有効になりません。 |
--renameenumidents | boolean | Value of ...Value of option 'rename' | Rename ENUM identifiers which do not match their ‘expected’ string names. Note – this WILL break reflection based access, so is not automatically enabled. 想定される文字列名と一致しないENUM識別子の名前を変更します。注意:これによりリフレクションベースのアクセスが中断されるため、自動的には有効化されません。 |
--renameillegalidents | boolean | Value of ...Value of option 'rename' | Rename identifiers which are not valid java identifiers. Note – this WILL break reflection based access, so is not automatically enabled. 有効なJava識別子ではない識別子の名前を変更します。注意:これによりリフレクションベースのアクセスが中断されるため、自動的には有効化されません。 |
--renamesmallmembers | int >= 0 | 0 | Rename small members. Note – this WILL break reflection based access, so is not automatically enabled. 小さなメンバーの名前を変更します。注意:これによりリフレクションベースのアクセスが中断されるため、自動的には有効になりません。 |
--sealed | boolean | true if ...true if class file from version 62.0 (Java 18) or greater, or experimental in 60.0 (Java 16), 61.0 (Java 17) | Decompile ‘sealed’ constructs 「sealed」構造を逆コンパイルします |
--showinferrable | boolean | false if ...false if class file from version 51.0 (Java 7) or greater | Decorate methods with explicit types if not implied by arguments. 引数によって暗示されていない場合、明示的な型でメソッドを装飾します。 |
--showversion | boolean | true | Show used CFR version in header (handy to turn off when regression testing) 使用されている CFR バージョンをヘッダーに表示します(回帰テスト時にオフにすると便利です) |
--silent | boolean | false | Don’t display state while decompiling デコンパイル中に状態を表示しません |
--skipbatchinnerclasses | boolean | true | When processing many files, skip inner classes, as they will be processed as part of outer classes anyway. If false, you will see inner classes as separate entities also. 多数のファイルを処理する場合、内部クラスは外部クラスの一部として処理され、内部クラスをスキップします。false の場合、内部クラスも個別のエンティティとして表示されます。 |
--staticinitreturn | boolean | true | Try to remove return from static init static init から return を削除しようと試みます |
--stringbuffer | boolean | false if ...false if class file from version 49.0 (Java 5) or greater | Convert new StringBuffer().append.append.append to string + string + string – see https://benf.org/other/cfr/stringbuilder-vs-concatenation.html new StringBuffer().append.append.append を string + string + string に変換します。詳細は https://benf.org/other/cfr/stringbuilder-vs-concatenation.html を参照してください。 |
--stringbuilder | boolean | true if ...true if class file from version 49.0 (Java 5) or greater | Convert new StringBuilder().append.append.append to string + string + string – see https://benf.org/other/cfr/stringbuilder-vs-concatenation.html new StringBuilder().append.append.append を string + string + string に変換します。詳細は https://benf.org/other/cfr/stringbuilder-vs-concatenation.html を参照してください。 |
--stringconcat | boolean | true if ...true if class file from version 53.0 (Java 9) or greater | Convert usages of StringConcatFactor to string + string + string – see https://benf.org/other/cfr/java9stringconcat.html StringConcatFactor の使用を string + string + string に変換します。詳細は https://benf.org/other/cfr/java9stringconcat.html を参照してください。 |
--sugarasserts | boolean | true | Re-sugar assert calls assert呼び出しを元の糖衣構文に復元します |
--sugarboxing | boolean | true | Where possible, remove pointless boxing wrappers 可能な限り無意味なボクシングラッパーを削除します |
--sugarenums | boolean | true if ...true if class file from version 49.0 (Java 5) or greater | Re-sugar enums – see https://benf.org/other/cfr/how-are-enums-implemented.html enum を元の糖衣構文に復元します。詳細は https://benf.org/other/cfr/how-are-enums-implemented.html を参照してください |
--sugarretrolambda | boolean | false | Where possible, resugar uses of retro lambda 可能な限りレトロラムダの使用を元の糖衣構文に復元します |
--switchexpression | boolean | true if ...true if class file from version 58.0 (Java 14) or greater, or experimental in 56.0 (Java 12), 57.0 (Java 13) | Re-sugar switch expression switch式を元の糖衣構文に復元します |
--tidymonitors | boolean | true | Remove support code for monitors – e.g. catch blocks just to exit a monitor モニターのサポートコードを削除します(例:モニターを終了するためだけのcatchブロックなど) |
--trackbytecodeloc | boolean | false | Propagate bytecode location info. バイトコードの位置情報を伝播させます。 |
--tryresources | boolean | true if ...true if class file from version 51.0 (Java 7) or greater | Reconstruct try-with-resources try-with-resourcesを再構築します |
--usenametable | boolean | true | Use local variable name table if present 存在する場合はローカル変数名テーブルを使用します |
--usesignatures | boolean | true | Use signatures in addition to descriptors (when they are not obviously incorrect) (明らかに誤りがない場合)記述子に加えて署名を使用します |
--version | boolean | true | Show the current CFR version 現在のCFRバージョンを表示します |
--help | string | – | Show help for a given parameter 指定されたパラメータのヘルプを表示します |