@@ -142,7 +142,7 @@ public ArrayList<String> createPrint() {
142
142
} else if (ain instanceof MultiANewArrayInsnNode ) {
143
143
line = printMultiANewArrayInsnNode ((MultiANewArrayInsnNode ) ain );
144
144
} else {
145
- line = "// UNADDED OPCODE: " + nameOpcode (ain .opcode ()) + " " + ain .toString ();
145
+ line = "// UNADDED OPCODE: " + nameOpcode (ain .getOpcode ()) + " " + ain .toString ();
146
146
}
147
147
if (!line .equals ("" )) {
148
148
if (match )
@@ -159,7 +159,7 @@ public ArrayList<String> createPrint() {
159
159
160
160
protected String printVarInsnNode (VarInsnNode vin , ListIterator <?> it ) {
161
161
StringBuilder sb = new StringBuilder ();
162
- sb .append (nameOpcode (vin .opcode ()));
162
+ sb .append (nameOpcode (vin .getOpcode ()));
163
163
sb .append (" " );
164
164
sb .append (vin .var );
165
165
if (parent .createComments ()) {
@@ -177,31 +177,19 @@ protected String printVarInsnNode(VarInsnNode vin, ListIterator<?> it) {
177
177
}
178
178
179
179
protected String printIntInsnNode (IntInsnNode iin , ListIterator <?> it ) {
180
- return nameOpcode (iin .opcode ()) + " " + iin .operand ;
180
+ return nameOpcode (iin .getOpcode ()) + " " + iin .operand ;
181
181
}
182
182
183
183
protected String printFieldInsnNode (FieldInsnNode fin , ListIterator <?> it ) {
184
- String desc = Type .getType (fin .desc ).getClassName ();
185
- if (desc == null || desc .equals ("null" ))
186
- desc = fin .desc ;
187
- return nameOpcode (fin .opcode ()) + " " + fin .owner + "." + fin .name + ":" + desc ;
184
+ String desc = fin .desc ;
185
+ return nameOpcode (fin .getOpcode ()) + " " + fin .owner + "." + fin .name + ":" + desc ;
188
186
}
189
187
190
188
protected String printMethodInsnNode (MethodInsnNode min , ListIterator <?> it ) {
191
189
StringBuilder sb = new StringBuilder ();
192
- sb .append (nameOpcode (min .opcode ())).append (" " ).append (min .owner ).append (" " ).append (min .name ).append ("(" );
190
+ sb .append (nameOpcode (min .getOpcode ())).append (" " ).append (min .owner ).append (" " ).append (min .name ).append ("(" );
193
191
194
192
String desc = min .desc ;
195
- try {
196
- if (Type .getType (min .desc ) != null )
197
- desc = Type .getType (min .desc ).getClassName ();
198
-
199
- if (desc == null || desc .equals ("null" ))
200
- desc = min .desc ;
201
- } catch (java .lang .ArrayIndexOutOfBoundsException e ) {
202
-
203
- }
204
-
205
193
sb .append (desc );
206
194
207
195
sb .append (");" );
@@ -211,17 +199,17 @@ protected String printMethodInsnNode(MethodInsnNode min, ListIterator<?> it) {
211
199
212
200
protected String printLdcInsnNode (LdcInsnNode ldc , ListIterator <?> it ) {
213
201
if (ldc .cst instanceof String )
214
- return nameOpcode (ldc .opcode ()) + " \" " + StringEscapeUtils .escapeJava (ldc .cst .toString ()) + "\" (" + ldc .cst .getClass ().getCanonicalName () + ")" ;
202
+ return nameOpcode (ldc .getOpcode ()) + " \" " + StringEscapeUtils .escapeJava (ldc .cst .toString ()) + "\" (" + ldc .cst .getClass ().getCanonicalName () + ")" ;
215
203
216
- return nameOpcode (ldc .opcode ()) + " " + StringEscapeUtils .escapeJava (ldc .cst .toString ()) + " (" + ldc .cst .getClass ().getCanonicalName () + ")" ;
204
+ return nameOpcode (ldc .getOpcode ()) + " " + StringEscapeUtils .escapeJava (ldc .cst .toString ()) + " (" + ldc .cst .getClass ().getCanonicalName () + ")" ;
217
205
}
218
206
219
207
protected String printInsnNode (InsnNode in , ListIterator <?> it ) {
220
- return nameOpcode (in .opcode ());
208
+ return nameOpcode (in .getOpcode ());
221
209
}
222
210
223
211
protected String printJumpInsnNode (JumpInsnNode jin , ListIterator <?> it ) {
224
- String line = nameOpcode (jin .opcode ()) + " L" + resolveLabel (jin .label );
212
+ String line = nameOpcode (jin .getOpcode ()) + " L" + resolveLabel (jin .label );
225
213
return line ;
226
214
}
227
215
@@ -236,28 +224,19 @@ protected String printLabelnode(LabelNode label) {
236
224
protected String printTypeInsnNode (TypeInsnNode tin ) {
237
225
try {
238
226
String desc = tin .desc ;
239
- try {
240
- if (Type .getType (tin .desc ) != null )
241
- desc = Type .getType (tin .desc ).getClassName ();
242
-
243
- if (desc == null || desc .equals ("null" ))
244
- desc = tin .desc ;
245
- } catch (java .lang .ArrayIndexOutOfBoundsException | UnsupportedOperationException e ) {
246
-
247
- }
248
- return nameOpcode (tin .opcode ()) + " " + desc ;
227
+ return nameOpcode (tin .getOpcode ()) + " " + desc ;
249
228
} catch (Exception e ) {
250
229
new ExceptionUI (e , "printing instruction" );
251
230
}
252
231
return "// error" ;
253
232
}
254
233
255
234
protected String printIincInsnNode (IincInsnNode iin ) {
256
- return nameOpcode (iin .opcode ()) + " " + iin .var + " " + iin .incr ;
235
+ return nameOpcode (iin .getOpcode ()) + " " + iin .var + " " + iin .incr ;
257
236
}
258
237
259
238
protected String printTableSwitchInsnNode (TableSwitchInsnNode tin ) {
260
- String line = nameOpcode (tin .opcode ()) + " \n " ;
239
+ String line = nameOpcode (tin .getOpcode ()) + " \n " ;
261
240
List <?> labels = tin .labels ;
262
241
int count = 0 ;
263
242
for (int i = tin .min ; i < tin .max + 1 ; i ++) {
@@ -268,7 +247,7 @@ protected String printTableSwitchInsnNode(TableSwitchInsnNode tin) {
268
247
}
269
248
270
249
protected String printLookupSwitchInsnNode (LookupSwitchInsnNode lin ) {
271
- String line = nameOpcode (lin .opcode ()) + ": \n " ;
250
+ String line = nameOpcode (lin .getOpcode ()) + ": \n " ;
272
251
List <?> keys = lin .keys ;
273
252
List <?> labels = lin .labels ;
274
253
@@ -284,20 +263,9 @@ protected String printLookupSwitchInsnNode(LookupSwitchInsnNode lin) {
284
263
protected String printInvokeDynamicInsNode (InvokeDynamicInsnNode idin ) {
285
264
StringBuilder sb = new StringBuilder ();
286
265
final String bsmName = idin .bsm .getName ();
287
- sb .append (nameOpcode (idin .opcode ())).append (" " ).append (bsmName ).append ("<" );
266
+ sb .append (nameOpcode (idin .getOpcode ())).append (" " ).append (bsmName ).append ("<" );
288
267
289
268
String desc = idin .desc ;
290
- String partedDesc = idin .desc .substring (2 );
291
- try {
292
- if (Type .getType (partedDesc ) != null )
293
- desc = Type .getType (partedDesc ).getClassName ();
294
-
295
- if (desc == null || desc .equals ("null" ))
296
- desc = idin .desc ;
297
- } catch (java .lang .ArrayIndexOutOfBoundsException | UnsupportedOperationException e ) {
298
-
299
- }
300
-
301
269
sb .append (desc );
302
270
sb .append (">(\n " );
303
271
Object [] bsmArgs = idin .bsmArgs ;
@@ -328,7 +296,7 @@ protected String printInvokeDynamicInsNode(InvokeDynamicInsnNode idin) {
328
296
}
329
297
330
298
protected String printMultiANewArrayInsnNode (MultiANewArrayInsnNode manain ) {
331
- return nameOpcode (manain .opcode ()) + " " + manain .desc ;
299
+ return nameOpcode (manain .getOpcode ()) + " " + manain .desc ;
332
300
}
333
301
334
302
protected String nameOpcode (int opcode ) {
0 commit comments