jdk.internal.org.objectweb.asm.TypePath Java Examples

The following examples show how to use jdk.internal.org.objectweb.asm.TypePath. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MethodNode.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitInsnAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    // Finds the last real instruction, i.e. the instruction targeted by
    // this annotation.
    AbstractInsnNode insn = instructions.getLast();
    while (insn.getOpcode() == -1) {
        insn = insn.getPrevious();
    }
    // Adds the annotation to this instruction.
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (insn.visibleTypeAnnotations == null) {
            insn.visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
                    1);
        }
        insn.visibleTypeAnnotations.add(an);
    } else {
        if (insn.invisibleTypeAnnotations == null) {
            insn.invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
                    1);
        }
        insn.invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #2
Source File: Textifier.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public Printer visitLocalVariableAnnotation(int typeRef, TypePath typePath,
        Label[] start, Label[] end, int[] index, String desc,
        boolean visible) {
    buf.setLength(0);
    buf.append(tab2).append("LOCALVARIABLE @");
    appendDescriptor(FIELD_DESCRIPTOR, desc);
    buf.append('(');
    text.add(buf.toString());
    Textifier t = createTextifier();
    text.add(t.getText());
    buf.setLength(0);
    buf.append(") : ");
    appendTypeReference(typeRef);
    buf.append(", ").append(typePath);
    for (int i = 0; i < start.length; ++i) {
        buf.append(" [ ");
        appendLabel(start[i]);
        buf.append(" - ");
        appendLabel(end[i]);
        buf.append(" - ").append(index[i]).append(" ]");
    }
    buf.append(visible ? "\n" : " // invisible\n");
    text.add(buf.toString());
    return t;
}
 
Example #3
Source File: MethodNode.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitInsnAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    // Finds the last real instruction, i.e. the instruction targeted by
    // this annotation.
    AbstractInsnNode insn = instructions.getLast();
    while (insn.getOpcode() == -1) {
        insn = insn.getPrevious();
    }
    // Adds the annotation to this instruction.
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (insn.visibleTypeAnnotations == null) {
            insn.visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
                    1);
        }
        insn.visibleTypeAnnotations.add(an);
    } else {
        if (insn.invisibleTypeAnnotations == null) {
            insn.invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
                    1);
        }
        insn.invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #4
Source File: CheckMethodAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitInsnAnnotation(final int typeRef,
        final TypePath typePath, final String desc, final boolean visible) {
    checkStartCode();
    checkEndCode();
    int sort = typeRef >>> 24;
    if (sort != TypeReference.INSTANCEOF && sort != TypeReference.NEW
            && sort != TypeReference.CONSTRUCTOR_REFERENCE
            && sort != TypeReference.METHOD_REFERENCE
            && sort != TypeReference.CAST
            && sort != TypeReference.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
            && sort != TypeReference.METHOD_INVOCATION_TYPE_ARGUMENT
            && sort != TypeReference.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
            && sort != TypeReference.METHOD_REFERENCE_TYPE_ARGUMENT) {
        throw new IllegalArgumentException("Invalid type reference sort 0x"
                + Integer.toHexString(sort));
    }
    CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
    CheckMethodAdapter.checkDesc(desc, false);
    return new CheckAnnotationAdapter(super.visitInsnAnnotation(typeRef,
            typePath, desc, visible));
}
 
Example #5
Source File: ClassNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (visibleTypeAnnotations == null) {
            visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        visibleTypeAnnotations.add(an);
    } else {
        if (invisibleTypeAnnotations == null) {
            invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #6
Source File: MethodNode.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (visibleTypeAnnotations == null) {
            visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        visibleTypeAnnotations.add(an);
    } else {
        if (invisibleTypeAnnotations == null) {
            invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #7
Source File: MethodNode.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
        TypePath typePath, Label[] start, Label[] end, int[] index,
        String desc, boolean visible) {
    LocalVariableAnnotationNode an = new LocalVariableAnnotationNode(
            typeRef, typePath, getLabelNodes(start), getLabelNodes(end),
            index, desc);
    if (visible) {
        if (visibleLocalVariableAnnotations == null) {
            visibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        visibleLocalVariableAnnotations.add(an);
    } else {
        if (invisibleLocalVariableAnnotations == null) {
            invisibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        invisibleLocalVariableAnnotations.add(an);
    }
    return an;
}
 
Example #8
Source File: MethodNode.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
        TypePath typePath, Label[] start, Label[] end, int[] index,
        String desc, boolean visible) {
    LocalVariableAnnotationNode an = new LocalVariableAnnotationNode(
            typeRef, typePath, getLabelNodes(start), getLabelNodes(end),
            index, desc);
    if (visible) {
        if (visibleLocalVariableAnnotations == null) {
            visibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        visibleLocalVariableAnnotations.add(an);
    } else {
        if (invisibleLocalVariableAnnotations == null) {
            invisibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        invisibleLocalVariableAnnotations.add(an);
    }
    return an;
}
 
Example #9
Source File: MethodNode.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
        TypePath typePath, Label[] start, Label[] end, int[] index,
        String desc, boolean visible) {
    LocalVariableAnnotationNode an = new LocalVariableAnnotationNode(
            typeRef, typePath, getLabelNodes(start), getLabelNodes(end),
            index, desc);
    if (visible) {
        if (visibleLocalVariableAnnotations == null) {
            visibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        visibleLocalVariableAnnotations.add(an);
    } else {
        if (invisibleLocalVariableAnnotations == null) {
            invisibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        invisibleLocalVariableAnnotations.add(an);
    }
    return an;
}
 
Example #10
Source File: FieldNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (visibleTypeAnnotations == null) {
            visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        visibleTypeAnnotations.add(an);
    } else {
        if (invisibleTypeAnnotations == null) {
            invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #11
Source File: CheckMethodAdapter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitInsnAnnotation(final int typeRef,
        final TypePath typePath, final String desc, final boolean visible) {
    checkStartCode();
    checkEndCode();
    int sort = typeRef >>> 24;
    if (sort != TypeReference.INSTANCEOF && sort != TypeReference.NEW
            && sort != TypeReference.CONSTRUCTOR_REFERENCE
            && sort != TypeReference.METHOD_REFERENCE
            && sort != TypeReference.CAST
            && sort != TypeReference.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
            && sort != TypeReference.METHOD_INVOCATION_TYPE_ARGUMENT
            && sort != TypeReference.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
            && sort != TypeReference.METHOD_REFERENCE_TYPE_ARGUMENT) {
        throw new IllegalArgumentException("Invalid type reference sort 0x"
                + Integer.toHexString(sort));
    }
    CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
    CheckMethodAdapter.checkDesc(desc, false);
    return new CheckAnnotationAdapter(super.visitInsnAnnotation(typeRef,
            typePath, desc, visible));
}
 
Example #12
Source File: FieldNode.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (visibleTypeAnnotations == null) {
            visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        visibleTypeAnnotations.add(an);
    } else {
        if (invisibleTypeAnnotations == null) {
            invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #13
Source File: Textifier.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public Printer visitTryCatchAnnotation(int typeRef, TypePath typePath,
        String desc, boolean visible) {
    buf.setLength(0);
    buf.append(tab2).append("TRYCATCHBLOCK @");
    appendDescriptor(FIELD_DESCRIPTOR, desc);
    buf.append('(');
    text.add(buf.toString());
    Textifier t = createTextifier();
    text.add(t.getText());
    buf.setLength(0);
    buf.append(") : ");
    appendTypeReference(typeRef);
    buf.append(", ").append(typePath);
    buf.append(visible ? "\n" : " // invisible\n");
    text.add(buf.toString());
    return t;
}
 
Example #14
Source File: RemappingMethodAdapter.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(
        final int typeRef,
        final TypePath typePath,
        final Label[] start,
        final Label[] end,
        final int[] index,
        final String descriptor,
        final boolean visible) {
    AnnotationVisitor annotationVisitor =
            super.visitLocalVariableAnnotation(
                    typeRef, typePath, start, end, index, remapper.mapDesc(descriptor), visible);
    return annotationVisitor == null
            ? annotationVisitor
            : new RemappingAnnotationAdapter(annotationVisitor, remapper);
}
 
Example #15
Source File: ClassNode.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (visibleTypeAnnotations == null) {
            visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        visibleTypeAnnotations.add(an);
    } else {
        if (invisibleTypeAnnotations == null) {
            invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #16
Source File: MethodNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
        if (visibleTypeAnnotations == null) {
            visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        visibleTypeAnnotations.add(an);
    } else {
        if (invisibleTypeAnnotations == null) {
            invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
        }
        invisibleTypeAnnotations.add(an);
    }
    return an;
}
 
Example #17
Source File: CheckMethodAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(final int typeRef,
        final TypePath typePath, final String desc, final boolean visible) {
    checkEndMethod();
    int sort = typeRef >>> 24;
    if (sort != TypeReference.METHOD_TYPE_PARAMETER
            && sort != TypeReference.METHOD_TYPE_PARAMETER_BOUND
            && sort != TypeReference.METHOD_RETURN
            && sort != TypeReference.METHOD_RECEIVER
            && sort != TypeReference.METHOD_FORMAL_PARAMETER
            && sort != TypeReference.THROWS) {
        throw new IllegalArgumentException("Invalid type reference sort 0x"
                + Integer.toHexString(sort));
    }
    CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
    CheckMethodAdapter.checkDesc(desc, false);
    return new CheckAnnotationAdapter(super.visitTypeAnnotation(typeRef,
            typePath, desc, visible));
}
 
Example #18
Source File: MethodNode.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(
        final int typeRef,
        final TypePath typePath,
        final Label[] start,
        final Label[] end,
        final int[] index,
        final String descriptor,
        final boolean visible) {
    LocalVariableAnnotationNode localVariableAnnotation =
            new LocalVariableAnnotationNode(
                    typeRef, typePath, getLabelNodes(start), getLabelNodes(end), index, descriptor);
    if (visible) {
        if (visibleLocalVariableAnnotations == null) {
            visibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(1);
        }
        visibleLocalVariableAnnotations.add(localVariableAnnotation);
    } else {
        if (invisibleLocalVariableAnnotations == null) {
            invisibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(1);
        }
        invisibleLocalVariableAnnotations.add(localVariableAnnotation);
    }
    return localVariableAnnotation;
}
 
Example #19
Source File: CheckClassAdapter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(final int typeRef,
        final TypePath typePath, final String desc, final boolean visible) {
    checkState();
    int sort = typeRef >>> 24;
    if (sort != TypeReference.CLASS_TYPE_PARAMETER
            && sort != TypeReference.CLASS_TYPE_PARAMETER_BOUND
            && sort != TypeReference.CLASS_EXTENDS) {
        throw new IllegalArgumentException("Invalid type reference sort 0x"
                + Integer.toHexString(sort));
    }
    checkTypeRefAndPath(typeRef, typePath);
    CheckMethodAdapter.checkDesc(desc, false);
    return new CheckAnnotationAdapter(super.visitTypeAnnotation(typeRef,
            typePath, desc, visible));
}
 
Example #20
Source File: Textifier.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Prints a disassembled view of the given type annotation.
 *
 * @param typeRef
 *            a reference to the annotated type. 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
 *            <tt>null</tt> if the annotation targets 'typeRef' as a whole.
 * @param desc
 *            the class descriptor of the annotation class.
 * @param visible
 *            <tt>true</tt> if the annotation is visible at runtime.
 * @return a visitor to visit the annotation values.
 */
public Textifier visitTypeAnnotation(final int typeRef,
        final TypePath typePath, final String desc, final boolean visible) {
    buf.setLength(0);
    buf.append(tab).append('@');
    appendDescriptor(FIELD_DESCRIPTOR, desc);
    buf.append('(');
    text.add(buf.toString());
    Textifier t = createTextifier();
    text.add(t.getText());
    buf.setLength(0);
    buf.append(") : ");
    appendTypeReference(typeRef);
    buf.append(", ").append(typePath);
    buf.append(visible ? "\n" : " // invisible\n");
    text.add(buf.toString());
    return t;
}
 
Example #21
Source File: Textifier.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public Printer visitTryCatchAnnotation(int typeRef, TypePath typePath,
        String desc, boolean visible) {
    buf.setLength(0);
    buf.append(tab2).append("TRYCATCHBLOCK @");
    appendDescriptor(FIELD_DESCRIPTOR, desc);
    buf.append('(');
    text.add(buf.toString());
    Textifier t = createTextifier();
    text.add(t.getText());
    buf.setLength(0);
    buf.append(") : ");
    appendTypeReference(typeRef);
    buf.append(", ").append(typePath);
    buf.append(visible ? "\n" : " // invisible\n");
    text.add(buf.toString());
    return t;
}
 
Example #22
Source File: Textifier.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public Printer visitTryCatchAnnotation(int typeRef, TypePath typePath,
        String desc, boolean visible) {
    buf.setLength(0);
    buf.append(tab2).append("TRYCATCHBLOCK @");
    appendDescriptor(FIELD_DESCRIPTOR, desc);
    buf.append('(');
    text.add(buf.toString());
    Textifier t = createTextifier();
    text.add(t.getText());
    buf.setLength(0);
    buf.append(") : ");
    appendTypeReference(typeRef);
    buf.append(", ").append(typePath);
    buf.append(visible ? "\n" : " // invisible\n");
    text.add(buf.toString());
    return t;
}
 
Example #23
Source File: MethodNode.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
        TypePath typePath, Label[] start, Label[] end, int[] index,
        String desc, boolean visible) {
    LocalVariableAnnotationNode an = new LocalVariableAnnotationNode(
            typeRef, typePath, getLabelNodes(start), getLabelNodes(end),
            index, desc);
    if (visible) {
        if (visibleLocalVariableAnnotations == null) {
            visibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        visibleLocalVariableAnnotations.add(an);
    } else {
        if (invisibleLocalVariableAnnotations == null) {
            invisibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
                    1);
        }
        invisibleLocalVariableAnnotations.add(an);
    }
    return an;
}
 
Example #24
Source File: RemappingMethodAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@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 RemappingAnnotationAdapter(av, remapper);
}
 
Example #25
Source File: RemappingMethodAdapter.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
        TypePath typePath, Label[] start, Label[] end, int[] index,
        String desc, boolean visible) {
    AnnotationVisitor av = super.visitLocalVariableAnnotation(typeRef,
            typePath, start, end, index, remapper.mapDesc(desc), visible);
    return av == null ? av : new RemappingAnnotationAdapter(av, remapper);
}
 
Example #26
Source File: FieldRemapper.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(
        final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) {
    AnnotationVisitor annotationVisitor =
            super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible);
    return annotationVisitor == null
            ? null
            : new AnnotationRemapper(api, annotationVisitor, remapper);
}
 
Example #27
Source File: MethodRemapper.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
        TypePath typePath, Label[] start, Label[] end, int[] index,
        String desc, boolean visible) {
    AnnotationVisitor av = super.visitLocalVariableAnnotation(typeRef,
            typePath, start, end, index, remapper.mapDesc(desc), visible);
    return av == null ? av : new AnnotationRemapper(av, remapper);
}
 
Example #28
Source File: TraceMethodVisitor.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #29
Source File: TraceFieldVisitor.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    Printer p = this.p.visitFieldTypeAnnotation(typeRef, typePath, desc,
            visible);
    AnnotationVisitor av = fv == null ? null : fv.visitTypeAnnotation(
            typeRef, typePath, desc, visible);
    return new TraceAnnotationVisitor(av, p);
}
 
Example #30
Source File: RemappingFieldAdapter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
        TypePath typePath, String desc, boolean visible) {
    AnnotationVisitor av = super.visitTypeAnnotation(typeRef, typePath,
            remapper.mapDesc(desc), visible);
    return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}