Package org.objectweb.asm

Examples of org.objectweb.asm.AnnotationVisitor.visitEnd()


                 "java/lang/Object", null);

        AnnotationVisitor av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlRootElement;", true);
        av0.visit("name", wrapperElement.getLocalPart());
        av0.visit("namespace", wrapperElement.getNamespaceURI());
        av0.visitEnd();

        av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlAccessorType;", true);
        av0.visitEnum("value", "Ljavax/xml/bind/annotation/XmlAccessType;", "FIELD");
        av0.visitEnd();
View Full Code Here


        av0.visit("namespace", wrapperElement.getNamespaceURI());
        av0.visitEnd();

        av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlAccessorType;", true);
        av0.visitEnum("value", "Ljavax/xml/bind/annotation/XmlAccessType;", "FIELD");
        av0.visitEnd();

        av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlType;", true);
        if (!anonymous) {
            av0.visit("name", wrapperElement.getLocalPart());
            av0.visit("namespace", wrapperElement.getNamespaceURI());
View Full Code Here

            av0.visit("name", wrapperElement.getLocalPart());
            av0.visit("namespace", wrapperElement.getNamespaceURI());
        } else {
            av0.visit("name", "");           
        }
        av0.visitEnd();

        // add constructor
        MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        Label lbegin = new Label();
View Full Code Here

    // @Path(<path>)
    private static void annotatePath(ClassWriter cw, String path) {
        AnnotationVisitor av = cw.visitAnnotation("Ljavax/ws/rs/Path;", true);
        av.visit("value", path);
        av.visitEnd();
    }

    // @Consumes(<contentTypes>)
    // @Provides(<contentTypes>)
    private static void annotateContentTypes(ClassWriter cw, String consumes, String produces) {
View Full Code Here

            av = cw.visitAnnotation("Ljavax/ws/rs/Consumes;", true);
            AnnotationVisitor av1 = av.visitArray("value");
            for (String s : consumes.split("(,| )")) {
                av1.visit(null, s.trim());
            }
            av1.visitEnd();
            av.visitEnd();
        }
        if (produces != null) {
            av = cw.visitAnnotation("Ljavax/ws/rs/Produces;", true);
            AnnotationVisitor av1 = av.visitArray("value");
View Full Code Here

            av = cw.visitAnnotation("Ljavax/ws/rs/Produces;", true);
            AnnotationVisitor av1 = av.visitArray("value");
            for (String s : produces.split("(,| )")) {
                av1.visit(null, s.trim());
            }
            av1.visitEnd();
            av.visitEnd();
        }
    }

    // @Consumes(<contentTypes>)
View Full Code Here

            av = mv.visitAnnotation("Ljavax/ws/rs/Consumes;", true);
            AnnotationVisitor av1 = av.visitArray("value");
            for (String s : consumes.split("(,| )")) {
                av1.visit(null, s.trim());
            }
            av1.visitEnd();
            av.visitEnd();
        }
        if (produces != null) {
            av = mv.visitAnnotation("Ljavax/ws/rs/Produces;", true);
            AnnotationVisitor av1 = av.visitArray("value");
View Full Code Here

            av = mv.visitAnnotation("Ljavax/ws/rs/Produces;", true);
            AnnotationVisitor av1 = av.visitArray("value");
            for (String s : produces.split("(,| )")) {
                av1.visit(null, s.trim());
            }
            av1.visitEnd();
            av.visitEnd();
        }
    }
}
View Full Code Here

        AnnotationVisitor av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlSchema;", true);
        av0.visit("namespace", ns);
        av0.visitEnum("elementFormDefault",
                      getClassCode(XmlNsForm.class),
                      q ? "QUALIFIED" : "UNQUALIFIED");
        av0.visitEnd();
        cw.visitEnd();

        loadClass(className, clz, cw.toByteArray());
    }
View Full Code Here

            av0.visit("nillable", "true");
        }
        if (factory.getWrapperPartMinOccurs(mpi) == 1) {
            av0.visit("required", "true");
        }
        av0.visitEnd();

        List<Annotation> jaxbAnnos = getJaxbAnnos(mpi);
        addJAXBAnnotations(fv, jaxbAnnos);
        fv.visitEnd();
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.