@@ -59,37 +59,37 @@ private ClassProcessor() {
59
59
60
60
public static void registerCommandLineOptions (OptionParser parser ) {
61
61
CoreProcess .INSTANCE .registerCommandLineOptions (parser ::accepts , parser ::accepts );
62
- for (Process process : LOADER ) {
62
+ for (Process process : LOADER ) {
63
63
process .registerCommandLineOptions ((option ) -> parser .accepts (process .getName () + '.' + option ),
64
64
(option , description ) -> parser .accepts (process .getName () + '.' + option , description ));
65
65
}
66
66
}
67
67
68
68
public static void acceptCommandLineValues (OptionSet options ) {
69
69
CoreProcess .INSTANCE .acceptCommandLineValues (options ::has , options ::hasArgument , options ::valueOf , options ::valuesOf );
70
- for (Process process : LOADER ) {
70
+ for (Process process : LOADER ) {
71
71
process .acceptCommandLineValues (options ::has , options ::hasArgument , options ::valueOf , options ::valuesOf );
72
72
}
73
73
}
74
74
75
75
public static void fetchOptions () {
76
- for (Process process : LOADER ) {
76
+ for (Process process : LOADER ) {
77
77
process .fetchOptions ();
78
78
}
79
79
}
80
80
81
81
public static void beforeRunning (ClassifiedDeobfuscator .DeobfuscateOptions options , @ Nullable String targetNamespace ,
82
82
ClassifiedMappingRemapper mappingRemapper ) throws IOException {
83
83
CoreProcess .INSTANCE .beforeRunning (options , targetNamespace , mappingRemapper );
84
- for (Process process : LOADER ) {
84
+ for (Process process : LOADER ) {
85
85
process .beforeRunning (options , targetNamespace , mappingRemapper );
86
86
}
87
87
}
88
88
89
89
public static void afterRunning (ClassifiedDeobfuscator .DeobfuscateOptions options , @ Nullable String targetNamespace ,
90
90
ClassifiedMappingRemapper mappingRemapper ) throws IOException {
91
91
CoreProcess .INSTANCE .afterRunning (options , targetNamespace , mappingRemapper );
92
- for (Process process : LOADER ) {
92
+ for (Process process : LOADER ) {
93
93
process .afterRunning (options , targetNamespace , mappingRemapper );
94
94
}
95
95
}
@@ -98,11 +98,11 @@ public static ClassVisitor getVisitor(ClassWriter writer, ClassifiedDeobfuscator
98
98
@ Nullable ClassMapping <? extends Mapping > mapping , String targetNamespace ,
99
99
ClassifiedMappingRemapper mappingRemapper ) {
100
100
ClassVisitor cv = writer ;
101
- for (Process process : AFTER ) {
101
+ for (Process process : AFTER ) {
102
102
cv = process .getVisitor (options , reader , mapping , targetNamespace , mappingRemapper ).apply (cv );
103
103
}
104
104
cv = CoreProcess .INSTANCE .getVisitor (options , reader , mapping , targetNamespace , mappingRemapper ).apply (cv );
105
- for (Process process : BEFORE ) {
105
+ for (Process process : BEFORE ) {
106
106
cv = process .getVisitor (options , reader , mapping , targetNamespace , mappingRemapper ).apply (cv );
107
107
}
108
108
return cv ;
@@ -173,13 +173,13 @@ public State getState() {
173
173
@ Override
174
174
public void beforeRunning (ClassifiedDeobfuscator .DeobfuscateOptions options , String targetNamespace ,
175
175
ClassifiedMappingRemapper mappingRemapper ) {
176
- if (options .rvn ()) VariableNameGenerator .startRecord ();
176
+ if (options .rvn ()) VariableNameGenerator .startRecord ();
177
177
}
178
178
179
179
@ Override
180
180
public void afterRunning (ClassifiedDeobfuscator .DeobfuscateOptions options , String targetNamespace ,
181
181
ClassifiedMappingRemapper mappingRemapper ) throws IOException {
182
- if (options .rvn ()) VariableNameGenerator .endRecord (Properties .TEMP_DIR .resolve (FERNFLOWER_ABSTRACT_PARAMETER_NAMES ));
182
+ if (options .rvn ()) VariableNameGenerator .endRecord (Properties .TEMP_DIR .resolve (FERNFLOWER_ABSTRACT_PARAMETER_NAMES ));
183
183
}
184
184
185
185
@ Override
@@ -188,13 +188,15 @@ public Function<ClassVisitor, ClassVisitor> getVisitor(ClassifiedDeobfuscator.De
188
188
ClassifiedMappingRemapper mappingRemapper ) {
189
189
return parent -> {
190
190
ClassVisitor cv = parent ;
191
- if (options .rvn ()) cv = new VariableNameGenerator (cv );
192
- if ((reader .getAccess () & Opcodes .ACC_RECORD ) != 0 ) cv = new RecordNameRemapper (cv );
193
- if (mapping != null && mapping .mapping instanceof NameGetter .Namespaced ngn ) {
191
+ if (options .rvn ()) cv = new VariableNameGenerator (cv );
192
+ if ((reader .getAccess () & Opcodes .ACC_RECORD ) != 0 ) cv = new RecordNameRemapper (cv );
193
+ if (mapping != null && mapping .mapping instanceof NameGetter .Namespaced ngn ) {
194
194
ngn .setMappedNamespace (targetNamespace );
195
195
cv = new LVTRemapper (cv , (ClassMapping <NamespacedMapping >) mapping , mappingRemapper );
196
196
}
197
- return new RuntimeParameterAnnotationFixer (new ClassRemapper (cv , mappingRemapper ));
197
+ return new RuntimeParameterAnnotationFixer (
198
+ new MixinClassRemapper (
199
+ new ClassRemapper (cv , mappingRemapper ), mappingRemapper ));
198
200
};
199
201
}
200
202
}
0 commit comments