/// <summary>Makes the given visitor visit this try catch block.</summary> /// <param name="methodVisitor">a method visitor.</param> public virtual void Accept(MethodVisitor methodVisitor) { methodVisitor.VisitTryCatchBlock(start.GetLabel(), end.GetLabel(), handler == null ? null : handler.GetLabel(), type); if (visibleTypeAnnotations != null) { for (int i = 0, n = visibleTypeAnnotations.Count; i < n; ++i) { var typeAnnotation = visibleTypeAnnotations[i]; typeAnnotation.Accept(methodVisitor.VisitTryCatchAnnotation(typeAnnotation.typeRef , typeAnnotation.typePath, typeAnnotation.desc, true)); } } if (invisibleTypeAnnotations != null) { for (int i = 0, n = invisibleTypeAnnotations.Count; i < n; ++i) { var typeAnnotation = invisibleTypeAnnotations[i]; typeAnnotation.Accept(methodVisitor.VisitTryCatchAnnotation(typeAnnotation.typeRef , typeAnnotation.typePath, typeAnnotation.desc, false)); } } }
public override void Accept(MethodVisitor methodVisitor) { var labelsArray = new Label[labels.Count]; for (int i = 0, n = labelsArray.Length; i < n; ++i) { labelsArray[i] = labels[i].GetLabel(); } methodVisitor.VisitTableSwitchInsn(min, max, dflt.GetLabel(), labelsArray); AcceptAnnotations(methodVisitor); }
public override void Accept(MethodVisitor methodVisitor) { var keysArray = new int[keys.Count]; for (int i = 0, n = keysArray.Length; i < n; ++i) { keysArray[i] = keys[i]; } var labelsArray = new Label[labels.Count]; for (int i = 0, n = labelsArray.Length; i < n; ++i) { labelsArray[i] = labels[i].GetLabel(); } methodVisitor.VisitLookupSwitchInsn(dflt.GetLabel(), keysArray, labelsArray); AcceptAnnotations(methodVisitor); }
public override void Accept(MethodVisitor methodVisitor) { methodVisitor.VisitLineNumber(line, start.GetLabel()); }
public override void Accept(MethodVisitor methodVisitor) { methodVisitor.VisitJumpInsn(opcode, label.GetLabel()); AcceptAnnotations(methodVisitor); }