Package org.apache.cxf.tools.common.model

Examples of org.apache.cxf.tools.common.model.JavaField.addAnnotation()


        if (!StringUtils.isEmpty(jField.getTargetNamespace())) {
            xmlElementAnnotation.addElement(new JAnnotationElement("namespace",
                                                                          jField.getTargetNamespace()));
        }

        jField.addAnnotation(xmlElementAnnotation);
       
        for (Annotation ann : jField.getJaxbAnnotaions()) {
            if (ann instanceof XmlMimeType) {
                JAnnotation mimeAnno = new JAnnotation(XmlMimeType.class);
                mimeAnno.addElement(new JAnnotationElement("value", ((XmlMimeType)ann).value()));
View Full Code Here


       
        for (Annotation ann : jField.getJaxbAnnotaions()) {
            if (ann instanceof XmlMimeType) {
                JAnnotation mimeAnno = new JAnnotation(XmlMimeType.class);
                mimeAnno.addElement(new JAnnotationElement("value", ((XmlMimeType)ann).value()));
                jField.addAnnotation(mimeAnno);
            } else if (ann instanceof XmlJavaTypeAdapter) {          
                JAnnotation jaxbAnn = new JAnnotation(XmlJavaTypeAdapter.class);
                jaxbAnn.addElement(new JAnnotationElement("value", ((XmlJavaTypeAdapter)ann).value()));
                jaxbAnn.addElement(new JAnnotationElement("type", ((XmlJavaTypeAdapter)ann).type()));
                jField.addAnnotation(jaxbAnn);
View Full Code Here

                jField.addAnnotation(mimeAnno);
            } else if (ann instanceof XmlJavaTypeAdapter) {          
                JAnnotation jaxbAnn = new JAnnotation(XmlJavaTypeAdapter.class);
                jaxbAnn.addElement(new JAnnotationElement("value", ((XmlJavaTypeAdapter)ann).value()));
                jaxbAnn.addElement(new JAnnotationElement("type", ((XmlJavaTypeAdapter)ann).type()));
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlAttachmentRef) {
                JAnnotation jaxbAnn = new JAnnotation(XmlAttachmentRef.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlList) {
                JAnnotation jaxbAnn = new JAnnotation(XmlList.class);
View Full Code Here

                jaxbAnn.addElement(new JAnnotationElement("value", ((XmlJavaTypeAdapter)ann).value()));
                jaxbAnn.addElement(new JAnnotationElement("type", ((XmlJavaTypeAdapter)ann).type()));
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlAttachmentRef) {
                JAnnotation jaxbAnn = new JAnnotation(XmlAttachmentRef.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlList) {
                JAnnotation jaxbAnn = new JAnnotation(XmlList.class);
                jField.addAnnotation(jaxbAnn);
            }
        }
View Full Code Here

            } else if (ann instanceof XmlAttachmentRef) {
                JAnnotation jaxbAnn = new JAnnotation(XmlAttachmentRef.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlList) {
                JAnnotation jaxbAnn = new JAnnotation(XmlList.class);
                jField.addAnnotation(jaxbAnn);
            }
        }
    }
}
View Full Code Here

        boolean hasEl = false;
        for (Annotation ann : jField.getJaxbAnnotaions()) {
            if (ann instanceof XmlMimeType) {
                JAnnotation mimeAnno = new JAnnotation(XmlMimeType.class);
                mimeAnno.addElement(new JAnnotationElement("value", ((XmlMimeType)ann).value()));
                jField.addAnnotation(mimeAnno);
            } else if (ann instanceof XmlJavaTypeAdapter) {          
                JAnnotation jaxbAnn = new JAnnotation(XmlJavaTypeAdapter.class);
                jaxbAnn.addElement(new JAnnotationElement("value", ((XmlJavaTypeAdapter)ann).value()));
                jaxbAnn.addElement(new JAnnotationElement("type", ((XmlJavaTypeAdapter)ann).type()));
                jField.addAnnotation(jaxbAnn);
View Full Code Here

                jField.addAnnotation(mimeAnno);
            } else if (ann instanceof XmlJavaTypeAdapter) {          
                JAnnotation jaxbAnn = new JAnnotation(XmlJavaTypeAdapter.class);
                jaxbAnn.addElement(new JAnnotationElement("value", ((XmlJavaTypeAdapter)ann).value()));
                jaxbAnn.addElement(new JAnnotationElement("type", ((XmlJavaTypeAdapter)ann).type()));
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlAttachmentRef) {
                JAnnotation jaxbAnn = new JAnnotation(XmlAttachmentRef.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlList) {
                JAnnotation jaxbAnn = new JAnnotation(XmlList.class);
View Full Code Here

                jaxbAnn.addElement(new JAnnotationElement("value", ((XmlJavaTypeAdapter)ann).value()));
                jaxbAnn.addElement(new JAnnotationElement("type", ((XmlJavaTypeAdapter)ann).type()));
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlAttachmentRef) {
                JAnnotation jaxbAnn = new JAnnotation(XmlAttachmentRef.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlList) {
                JAnnotation jaxbAnn = new JAnnotation(XmlList.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlElement) {
                hasEl = true;
View Full Code Here

            } else if (ann instanceof XmlAttachmentRef) {
                JAnnotation jaxbAnn = new JAnnotation(XmlAttachmentRef.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlList) {
                JAnnotation jaxbAnn = new JAnnotation(XmlList.class);
                jField.addAnnotation(jaxbAnn);
            } else if (ann instanceof XmlElement) {
                hasEl = true;
                XmlElement el = (XmlElement)ann;
                JAnnotation xmlElementAnnotation = new JAnnotation(XmlElement.class);
                xmlElementAnnotation.addElement(new JAnnotationElement("name", el.name()));
View Full Code Here

                }
                if (!StringUtils.isEmpty(el.defaultValue())) {
                    xmlElementAnnotation.addElement(new JAnnotationElement("defaultValue",
                                                                           el.defaultValue()));
                }
                jField.addAnnotation(xmlElementAnnotation);
            }
        }
        if (!hasEl) {
            JAnnotation xmlElementAnnotation = new JAnnotation(XmlElement.class);
            xmlElementAnnotation.addElement(new JAnnotationElement("name", rawName));
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.