@@ -142,7 +142,7 @@ public ArrayList<String> createPrint() {
142142 } else if (ain instanceof MultiANewArrayInsnNode ) {
143143 line = printMultiANewArrayInsnNode ((MultiANewArrayInsnNode ) ain );
144144 } else {
145- line = "// UNADDED OPCODE: " + nameOpcode (ain .opcode ()) + " " + ain .toString ();
145+ line = "// UNADDED OPCODE: " + nameOpcode (ain .getOpcode ()) + " " + ain .toString ();
146146 }
147147 if (!line .equals ("" )) {
148148 if (match )
@@ -159,7 +159,7 @@ public ArrayList<String> createPrint() {
159159
160160 protected String printVarInsnNode (VarInsnNode vin , ListIterator <?> it ) {
161161 StringBuilder sb = new StringBuilder ();
162- sb .append (nameOpcode (vin .opcode ()));
162+ sb .append (nameOpcode (vin .getOpcode ()));
163163 sb .append (" " );
164164 sb .append (vin .var );
165165 if (parent .createComments ()) {
@@ -177,31 +177,19 @@ protected String printVarInsnNode(VarInsnNode vin, ListIterator<?> it) {
177177 }
178178
179179 protected String printIntInsnNode (IntInsnNode iin , ListIterator <?> it ) {
180- return nameOpcode (iin .opcode ()) + " " + iin .operand ;
180+ return nameOpcode (iin .getOpcode ()) + " " + iin .operand ;
181181 }
182182
183183 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 ;
188186 }
189187
190188 protected String printMethodInsnNode (MethodInsnNode min , ListIterator <?> it ) {
191189 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 ("(" );
193191
194192 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-
205193 sb .append (desc );
206194
207195 sb .append (");" );
@@ -211,17 +199,17 @@ protected String printMethodInsnNode(MethodInsnNode min, ListIterator<?> it) {
211199
212200 protected String printLdcInsnNode (LdcInsnNode ldc , ListIterator <?> it ) {
213201 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 () + ")" ;
215203
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 () + ")" ;
217205 }
218206
219207 protected String printInsnNode (InsnNode in , ListIterator <?> it ) {
220- return nameOpcode (in .opcode ());
208+ return nameOpcode (in .getOpcode ());
221209 }
222210
223211 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 );
225213 return line ;
226214 }
227215
@@ -236,28 +224,19 @@ protected String printLabelnode(LabelNode label) {
236224 protected String printTypeInsnNode (TypeInsnNode tin ) {
237225 try {
238226 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 ;
249228 } catch (Exception e ) {
250229 new ExceptionUI (e , "printing instruction" );
251230 }
252231 return "// error" ;
253232 }
254233
255234 protected String printIincInsnNode (IincInsnNode iin ) {
256- return nameOpcode (iin .opcode ()) + " " + iin .var + " " + iin .incr ;
235+ return nameOpcode (iin .getOpcode ()) + " " + iin .var + " " + iin .incr ;
257236 }
258237
259238 protected String printTableSwitchInsnNode (TableSwitchInsnNode tin ) {
260- String line = nameOpcode (tin .opcode ()) + " \n " ;
239+ String line = nameOpcode (tin .getOpcode ()) + " \n " ;
261240 List <?> labels = tin .labels ;
262241 int count = 0 ;
263242 for (int i = tin .min ; i < tin .max + 1 ; i ++) {
@@ -268,7 +247,7 @@ protected String printTableSwitchInsnNode(TableSwitchInsnNode tin) {
268247 }
269248
270249 protected String printLookupSwitchInsnNode (LookupSwitchInsnNode lin ) {
271- String line = nameOpcode (lin .opcode ()) + ": \n " ;
250+ String line = nameOpcode (lin .getOpcode ()) + ": \n " ;
272251 List <?> keys = lin .keys ;
273252 List <?> labels = lin .labels ;
274253
@@ -284,20 +263,9 @@ protected String printLookupSwitchInsnNode(LookupSwitchInsnNode lin) {
284263 protected String printInvokeDynamicInsNode (InvokeDynamicInsnNode idin ) {
285264 StringBuilder sb = new StringBuilder ();
286265 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 ("<" );
288267
289268 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-
301269 sb .append (desc );
302270 sb .append (">(\n " );
303271 Object [] bsmArgs = idin .bsmArgs ;
@@ -328,7 +296,7 @@ protected String printInvokeDynamicInsNode(InvokeDynamicInsnNode idin) {
328296 }
329297
330298 protected String printMultiANewArrayInsnNode (MultiANewArrayInsnNode manain ) {
331- return nameOpcode (manain .opcode ()) + " " + manain .desc ;
299+ return nameOpcode (manain .getOpcode ()) + " " + manain .desc ;
332300 }
333301
334302 protected String nameOpcode (int opcode ) {
0 commit comments