Examples of visitAnnotation()


Examples of org.ow2.asm.AnnotationVisitor.visitAnnotation()

        av0.visitEnd();
        mv.visitEnd();

        mv = cw.visitMethod(M, "annotationValue", "()" + DOC, null, null);
        av0 = mv.visitAnnotationDefault();
        av1 = av0.visitAnnotation(null, DOC);
        av1.visitEnd();
        av0.visitEnd();
        mv.visitEnd();

        mv = cw.visitMethod(M, "byteArrayValue", "()[B", null, null);
View Full Code Here

Examples of org.ow2.asm.AnnotationVisitor.visitAnnotation()

    final class AnnotationValueAnnotationRule extends Rule {

        @Override
        public void begin(final String nm, final Attributes attrs) {
            AnnotationVisitor av = (AnnotationVisitor) peek();
            push(av == null ? null : av.visitAnnotation(attrs.getValue("name"),
                    attrs.getValue("desc")));
        }

        @Override
        public void end(final String name) {
View Full Code Here

Examples of org.ow2.asm.ClassWriter.visitAnnotation()

                null,
                "java/lang/Object",
                null);

        // visible class annotation
        cw.visitAnnotation(DEPRECATED, true).visitEnd();

        // invisible class annotation, with values of all types
        av0 = cw.visitAnnotation("Lpkg/Annotation;", false);
        av0.visit("byteValue", new Byte((byte) 0));
        av0.visit("charValue", new Character((char) 48));
View Full Code Here

Examples of org.ow2.asm.ClassWriter.visitAnnotation()

        // visible class annotation
        cw.visitAnnotation(DEPRECATED, true).visitEnd();

        // invisible class annotation, with values of all types
        av0 = cw.visitAnnotation("Lpkg/Annotation;", false);
        av0.visit("byteValue", new Byte((byte) 0));
        av0.visit("charValue", new Character((char) 48));
        av0.visit("booleanValue", Boolean.FALSE);
        av0.visit("intValue", new Integer(0));
        av0.visit("shortValue", new Short((short) 0));
View Full Code Here

Examples of org.ow2.asm.FieldVisitor.visitAnnotation()

        av0.visitArray("annotationArrayValue").visitEnd();
        av0.visitEnd();

        fv = cw.visitField(ACC_PUBLIC, "f", "I", null, null);
        // visible field annotation
        fv.visitAnnotation(DEPRECATED, true).visitEnd();
        // invisible field annotation
        av0 = fv.visitAnnotation("Lpkg/Annotation;", false);
        av0.visitEnum("enumValue", "Lpkg/Enum;", "V0");
        av0.visitEnd();
        fv.visitEnd();
View Full Code Here

Examples of org.ow2.asm.FieldVisitor.visitAnnotation()

        fv = cw.visitField(ACC_PUBLIC, "f", "I", null, null);
        // visible field annotation
        fv.visitAnnotation(DEPRECATED, true).visitEnd();
        // invisible field annotation
        av0 = fv.visitAnnotation("Lpkg/Annotation;", false);
        av0.visitEnum("enumValue", "Lpkg/Enum;", "V0");
        av0.visitEnd();
        fv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "(IIIIIIIIII)V", null, null);
View Full Code Here

Examples of org.ow2.asm.FieldVisitor.visitAnnotation()

        }
        int i, n;
        n = visibleAnnotations == null ? 0 : visibleAnnotations.size();
        for (i = 0; i < n; ++i) {
            AnnotationNode an = visibleAnnotations.get(i);
            an.accept(fv.visitAnnotation(an.desc, true));
        }
        n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size();
        for (i = 0; i < n; ++i) {
            AnnotationNode an = invisibleAnnotations.get(i);
            an.accept(fv.visitAnnotation(an.desc, false));
View Full Code Here

Examples of org.ow2.asm.FieldVisitor.visitAnnotation()

            an.accept(fv.visitAnnotation(an.desc, true));
        }
        n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size();
        for (i = 0; i < n; ++i) {
            AnnotationNode an = invisibleAnnotations.get(i);
            an.accept(fv.visitAnnotation(an.desc, false));
        }
        n = attrs == null ? 0 : attrs.size();
        for (i = 0; i < n; ++i) {
            fv.visitAttribute(attrs.get(i));
        }
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitAnnotation()

        av0.visitEnd();
        fv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "(IIIIIIIIII)V", null, null);
        // visible method annotation
        mv.visitAnnotation(DEPRECATED, true).visitEnd();
        // invisible method annotation
        av0 = mv.visitAnnotation("Lpkg/Annotation;", false);
        av0.visitAnnotation("annotationValue", DOC).visitEnd();
        av0.visitEnd();
        // synthetic parameter annotation
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitAnnotation()

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "(IIIIIIIIII)V", null, null);
        // visible method annotation
        mv.visitAnnotation(DEPRECATED, true).visitEnd();
        // invisible method annotation
        av0 = mv.visitAnnotation("Lpkg/Annotation;", false);
        av0.visitAnnotation("annotationValue", DOC).visitEnd();
        av0.visitEnd();
        // synthetic parameter annotation
        mv.visitParameterAnnotation(0, "Ljava/lang/Synthetic;", false);
        // visible parameter annotation
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.