public void visitTryCatch(DexLabel start, DexLabel end, DexLabel handler[], String type[]) { if (visitor != null) { visitor.visitTryCatch(start, end, handler, type); } }
public void accept(DexCodeVisitor cv) { cv.visitTryCatch(start, end, handler, type); } }
labels[listSize] = labelsMap.get(handler); dcv.visitTryCatch(labelsMap.get(start_addr), labelsMap.get(end), labels, types);
@Test public static void i63(DexClassVisitor cv) { DexMethodVisitor mv = cv.visitMethod(ACC_STATIC, new Method("La;", "b", new String[] {}, "V")); if (mv != null) { DexCodeVisitor code = mv.visitCode(); if (code != null) { code.visitRegister(1); DexLabel L1 = new DexLabel(); DexLabel L2 = new DexLabel(); code.visitLabel(L1); code.visitFieldStmt(Op.SGET, 0, -1, new Field("La;", "f", "J")); code.visitLabel(L2); code.visitStmt0R(Op.RETURN_VOID); code.visitEnd(); code.visitTryCatch(L1, L2, new DexLabel[] { L2 }, new String[] { "La;" }); } mv.visitEnd(); } } }
public static void a(DexClassVisitor cv) { DexMethodVisitor mv = cv.visitMethod(ACC_PUBLIC | ACC_STATIC, new Method("La;", "b", new String[] {}, "V")); DexCodeVisitor code = mv.visitCode(); code.visitRegister(2); DexLabel L0 = new DexLabel(); DexLabel L1 = new DexLabel(); DexLabel L2 = new DexLabel(); code.visitTryCatch(L0, L1, new DexLabel[] { L2 }, new String[] { "Lsome/Exception;" }); code.visitLabel(L0); code.visitConstStmt(CONST_STRING, 0, "abc"); code.visitLabel(L1); code.visitMethodStmt(INVOKE_VIRTUAL, new int[] { 0 }, new Method("Ljava/lang/String;", "toString", new String[] {}, "Ljava/lang/String;")); code.visitStmt0R(RETURN_VOID); code.visitLabel(L2); code.visitStmt1R(MOVE_EXCEPTION, 1); code.visitMethodStmt(INVOKE_VIRTUAL, new int[] { 1 }, new Method("Ljava/lang/String;", "toString", new String[] {}, "Ljava/lang/String;")); code.visitStmt0R(RETURN_VOID); code.visitEnd(); mv.visitEnd(); }
DexLabel catch_a = new DexLabel(); code.visitTryCatch(try_start, try_end, new DexLabel[] { catch_a }, new String[] { null }); code.visitRegister(2); code.visitFieldStmt(SGET_OBJECT, v0, -1, new Field("Ljava/lang/System;", "out", "Ljava/io/PrintStream;"));
DexLabel goto_2 = new DexLabel(); code.visitTryCatch(try_start_2, try_end_9, new DexLabel[] { catch_a }, new String[] { "Ljava/io/UnsupportedEncodingException;" });
DexLabel L1 = new DexLabel(); DexLabel L2 = new DexLabel(); code.visitTryCatch(L0, L1, new DexLabel[] { L2 }, new String[] { "Lorg/json/JSONException;" }); DexLabel L3 = new DexLabel(); DexLabel L4 = new DexLabel(); code.visitTryCatch(L3, L4, new DexLabel[] { L2 }, new String[] { "Lorg/json/JSONException;" }); DexLabel L5 = new DexLabel(); DexLabel L6 = new DexLabel(); code.visitTryCatch(L5, L6, new DexLabel[] { L2 }, new String[] { "Lorg/json/JSONException;" });
DexLabel L1 = new DexLabel(); DexLabel L2 = new DexLabel(); code.visitTryCatch(L0, L1, new DexLabel[] { L2 }, new String[] { "Ljava/lang/NumberFormatException;" });
public void visitTryCatch(DexLabel start, DexLabel end, DexLabel handler[], String type[]) { if (visitor != null) { visitor.visitTryCatch(start, end, handler, type); } }
public void accept(DexCodeVisitor cv) { cv.visitTryCatch(start, end, handler, type); } }
labels[listSize] = labelsMap.get(handler); dcv.visitTryCatch(labelsMap.get(start_addr), labelsMap.get(end), labels, types);