public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { return AnnotationVisitorTee.getInstance(mv1.visitTryCatchAnnotation(typeRef, typePath, desc, visible), mv2.visitTryCatchAnnotation(typeRef, typePath, desc, visible)); }
public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { return AnnotationVisitorTee.getInstance(mv1.visitTryCatchAnnotation(typeRef, typePath, desc, visible), mv2.visitTryCatchAnnotation(typeRef, typePath, desc, visible)); }
/** * Visits an annotation on an exception handler type. This method must be called <i>after</i> the * {@link #visitTryCatchBlock} for the annotated exception handler. It can be called several times * for the same exception handler. * * @param typeRef a reference to the annotated type. The sort of this type reference must be * {@link TypeReference#EXCEPTION_PARAMETER}. See {@link TypeReference}. * @param typePath the path to the annotated type argument, wildcard bound, array element type, or * static inner type within 'typeRef'. May be {@literal null} if the annotation targets * 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not * interested in visiting this annotation. */ public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { if (api < Opcodes.ASM5) { throw new UnsupportedOperationException(REQUIRES_ASM5); } if (mv != null) { return mv.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible); } return null; }
methodVisitor.visitTryCatchAnnotation( targetType & 0xFFFFFF00, path, annotationDescriptor, visible), currentOffset,
@Override public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { return super.visitTryCatchAnnotation(typeRef, typePath, desc, visible); }
@Override public AnnotationVisitor visitTryCatchAnnotation(final int typeRef, final TypePath typePath, final String desc, final boolean visible) { fsmCursor.transition("visitTryCatchAnnotation"); final AnnotationVisitor annotationVisitor = super.visitTryCatchAnnotation( typeRef, typePath, desc, visible); return annotationVisitor; // TODO: add CheckAnnotationVisitorFsm }
@Override public void begin(final String name, final Attributes attrs) { String desc = attrs.getValue("desc"); boolean visible = Boolean.valueOf(attrs.getValue("visible")).booleanValue(); int typeRef = Integer.parseInt(attrs.getValue("typeRef")); TypePath typePath = TypePath.fromString(attrs.getValue("typePath")); push(((MethodVisitor) peek()).visitTryCatchAnnotation(typeRef, typePath, desc, visible)); }
@Override public void begin(final String name, final Attributes attrs) { String desc = attrs.getValue("desc"); boolean visible = Boolean.valueOf(attrs.getValue("visible")) .booleanValue(); int typeRef = Integer.parseInt(attrs.getValue("typeRef")); TypePath typePath = TypePath.fromString(attrs.getValue("typePath")); push(((MethodVisitor) peek()).visitTryCatchAnnotation(typeRef, typePath, desc, visible)); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { AnnotationVisitor av = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible); return av == null ? av : new AnnotationRemapper(av, remapper); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { Printer annotationPrinter = p.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible); return new TraceAnnotationVisitor( super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible), annotationPrinter); }
@Override public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { Printer p = this.p.visitTryCatchAnnotation(typeRef, typePath, desc, visible); AnnotationVisitor av = mv == null ? null : mv.visitTryCatchAnnotation( typeRef, typePath, desc, visible); return new TraceAnnotationVisitor(av, p); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { Printer annotationPrinter = p.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible); return new TraceAnnotationVisitor( super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible), annotationPrinter); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor : new AnnotationRemapper(api, annotationVisitor, remapper); }
@Override public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { AnnotationVisitor av = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible); return av == null ? av : new AnnotationRemapper(av, remapper); }
/** * Makes the given visitor visit this try catch block. * * @param methodVisitor a method visitor. */ public void accept(final MethodVisitor methodVisitor) { methodVisitor.visitTryCatchBlock( start.getLabel(), end.getLabel(), handler == null ? null : handler.getLabel(), type); if (visibleTypeAnnotations != null) { for (int i = 0, n = visibleTypeAnnotations.size(); i < n; ++i) { TypeAnnotationNode typeAnnotation = visibleTypeAnnotations.get(i); typeAnnotation.accept( methodVisitor.visitTryCatchAnnotation( typeAnnotation.typeRef, typeAnnotation.typePath, typeAnnotation.desc, true)); } } if (invisibleTypeAnnotations != null) { for (int i = 0, n = invisibleTypeAnnotations.size(); i < n; ++i) { TypeAnnotationNode typeAnnotation = invisibleTypeAnnotations.get(i); typeAnnotation.accept( methodVisitor.visitTryCatchAnnotation( typeAnnotation.typeRef, typeAnnotation.typePath, typeAnnotation.desc, false)); } } } }
@Override public AnnotationVisitor visitTryCatchAnnotation(final int typeRef, final TypePath typePath, final String desc, final boolean visible) { checkStartCode(); checkEndCode(); int sort = typeRef >>> 24; if (sort != TypeReference.EXCEPTION_PARAMETER) { throw new IllegalArgumentException("Invalid type reference sort 0x" + Integer.toHexString(sort)); } CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath); CheckMethodAdapter.checkDesc(desc, false); return new CheckAnnotationAdapter(super.visitTryCatchAnnotation( typeRef, typePath, desc, visible)); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); int sort = new TypeReference(typeRef).getSort(); if (sort != TypeReference.EXCEPTION_PARAMETER) { throw new IllegalArgumentException(INVALID_TYPE_REFERENCE + Integer.toHexString(sort)); } CheckClassAdapter.checkTypeRef(typeRef); CheckMethodAdapter.checkDescriptor(version, descriptor, false); return new CheckAnnotationAdapter( super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible)); }
@Override public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); int sort = new TypeReference(typeRef).getSort(); if (sort != TypeReference.EXCEPTION_PARAMETER) { throw new IllegalArgumentException(INVALID_TYPE_REFERENCE + Integer.toHexString(sort)); } CheckClassAdapter.checkTypeRef(typeRef); CheckMethodAdapter.checkDescriptor(version, descriptor, false); return new CheckAnnotationAdapter( super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible)); }