Package javax.xml.bind.annotation

Examples of javax.xml.bind.annotation.XmlElement.type()


    private void processXmlElement(Property property, TypeInfo info) {
        if (helper.isAnnotationPresent(property.getElement(), XmlElement.class)) {
            XmlElement element = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);
            property.setIsRequired(element.required());
            property.setNillable(element.nillable());
            if (element.type() != XmlElement.DEFAULT.class) {
                property.setOriginalType(property.getType());
                property.setType(helper.getJavaClass(element.type()));
                property.setHasXmlElementType(true);
            }
            // handle default value
View Full Code Here


            XmlElement element = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);
            property.setIsRequired(element.required());
            property.setNillable(element.nillable());
            if (element.type() != XmlElement.DEFAULT.class) {
                property.setOriginalType(property.getType());
                property.setType(helper.getJavaClass(element.type()));
                property.setHasXmlElementType(true);
            }
            // handle default value
            if (!element.defaultValue().equals("\u0000")) {
                property.setDefaultValue(element.defaultValue());
View Full Code Here

                    qName = new QName(name);
                }
            }

            choiceProp.setPropertyName(property.getPropertyName());
            Class typeClass = next.type();

            if (typeClass.equals(XmlElement.DEFAULT.class)) {
                choiceProp.setType(propertyType);
            } else {
                choiceProp.setType(helper.getJavaClass(typeClass));
View Full Code Here

                    java.lang.annotation.Annotation nextAnnotation = annotations[j];

                    if (nextAnnotation != null) {
                        if (nextAnnotation instanceof XmlElement) {
                            XmlElement javaAnnotation = (XmlElement) nextAnnotation;
                            if (javaAnnotation.type() != XmlElement.DEFAULT.class) {
                                xmlElementType = javaAnnotation.type();
                            }
                        }
                    }
                }
View Full Code Here

                    if (nextAnnotation != null) {
                        if (nextAnnotation instanceof XmlElement) {
                            XmlElement javaAnnotation = (XmlElement) nextAnnotation;
                            if (javaAnnotation.type() != XmlElement.DEFAULT.class) {
                                xmlElementType = javaAnnotation.type();
                            }
                        }
                    }
                }
            }
View Full Code Here

    private void processXmlElement(Property property, TypeInfo info) {
        if (helper.isAnnotationPresent(property.getElement(), XmlElement.class)) {
            XmlElement element = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);
            property.setIsRequired(element.required());
            property.setNillable(element.nillable());
            if (element.type() != XmlElement.DEFAULT.class && !(property.isSwaAttachmentRef())) {
                property.setOriginalType(property.getType());
                if (helper.isCollectionType(property.getType()) || property.getType().isArray()) {
                    property.setGenericType(helper.getJavaClass(element.type()));
                } else {
                  JavaClass originalType = property.getType();
View Full Code Here

            property.setIsRequired(element.required());
            property.setNillable(element.nillable());
            if (element.type() != XmlElement.DEFAULT.class && !(property.isSwaAttachmentRef())) {
                property.setOriginalType(property.getType());
                if (helper.isCollectionType(property.getType()) || property.getType().isArray()) {
                    property.setGenericType(helper.getJavaClass(element.type()));
                } else {
                  JavaClass originalType = property.getType();
                  JavaClass newType =helper.getJavaClass(element.type());
                  if(!originalType.getName().equals(newType.getName())){
                    property.setTyped(true);
View Full Code Here

                property.setOriginalType(property.getType());
                if (helper.isCollectionType(property.getType()) || property.getType().isArray()) {
                    property.setGenericType(helper.getJavaClass(element.type()));
                } else {
                  JavaClass originalType = property.getType();
                  JavaClass newType =helper.getJavaClass(element.type());
                  if(!originalType.getName().equals(newType.getName())){
                    property.setTyped(true);
                    property.setSchemaType((QName) helper.getXMLToJavaTypeMap().get(newType.getName()));
                  }                   
                    property.setType(newType);
View Full Code Here

            xmlElement.setDefaultValue(next.defaultValue());
            xmlElement.setName(next.name());
            xmlElement.setNamespace(next.namespace());
            xmlElement.setNillable(next.nillable());
            xmlElement.setRequired(next.required());
            xmlElement.setType(next.type().getName());
            xmlElements.getXmlElement().add(xmlElement);
        }
        choiceProperty.setXmlElements(xmlElements);

        // handle XmlElementsJoinNodes
View Full Code Here

                av0.visit("name", el.name());
                av0.visit("nillable", el.nillable());
                av0.visit("required", el.required());
                av0.visit("namespace", el.namespace());
                av0.visit("defaultValue", el.defaultValue());
                if (el.type() != XmlElement.DEFAULT.class) {
                    av0.visit("type", el.type());                   
                }
                av0.visitEnd();
            } else if (ann instanceof XmlElementWrapper) {
                XmlElementWrapper el = (XmlElementWrapper)ann;
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.