Examples of RuntimeAttributePropertyInfo


Examples of com.sun.xml.bind.v2.model.runtime.RuntimeAttributePropertyInfo

                for (RuntimeTypeRef typeRef : propEl.getTypes()) {
                    handleTypeRef(classBuilder, propEl, typeRef, beanClass, beanVar);
                }
            } else if (prop instanceof RuntimeAttributePropertyInfo) {
                // Handle an attribute
                RuntimeAttributePropertyInfo propAt = (RuntimeAttributePropertyInfo) prop;
                RuntimeNonElement target = propAt.getTarget();

                ParserBuilder attBuilder = classBuilder.expectAttribute(propAt.getXmlName());
                JVar propVar = attBuilder.passParentVariable(beanVar);
               
                if (propAt.isCollection()) {
                  logger.info("Reader: attribute lists are not supported yet!");
                } else {
                    handlePropertyAttribute(attBuilder, propVar, beanClass, propAt, target, set);
                }
            } else if (prop instanceof RuntimeReferencePropertyInfo) {
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeAttributePropertyInfo

               
                for (RuntimeTypeRef typeRef : propEl.getTypes()) {
                    handlePropertyTypeRef(classBuilder, parentClass, propEl, typeRef);
                }
            } else if (prop instanceof RuntimeAttributePropertyInfo) {
                RuntimeAttributePropertyInfo propAt = (RuntimeAttributePropertyInfo) prop;
               
                Type rawType = propAt.getRawType();
                Class c = (Class) propAt.getTarget().getType();
                if (rawType instanceof Class) {
                    c = (Class) rawType;
                }
               
                JType jt = getType(rawType);
               
                String propName = JaxbUtil.getGetter(parentClass, propAt.getName(), rawType);
               
                WriterBuilder atBuilder =
                    classBuilder.writeAttribute(propAt.getXmlName(),
                                            jt,
                                            classBuilder.getObject().invoke(propName));
               
                if (propAt.isCollection()) {
                    logger.info("(JAXB Writer) Attribute lists are not supported yet!");
                } else {
                    writeSimpleTypeAttribute(atBuilder, rawType, c, jt);
                }
            } else if (prop instanceof RuntimeValuePropertyInfo) {
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeAttributePropertyInfo

                for (RuntimeTypeRef typeRef : propEl.getTypes()) {
                    handleTypeRef(classBuilder, propEl, typeRef, beanClass, beanVar);
                }
            } else if (prop instanceof RuntimeAttributePropertyInfo) {
                // Handle an attribute
                RuntimeAttributePropertyInfo propAt = (RuntimeAttributePropertyInfo) prop;
                RuntimeNonElement target = propAt.getTarget();

                ParserBuilder attBuilder = classBuilder.expectAttribute(propAt.getXmlName());
                JVar propVar = attBuilder.passParentVariable(beanVar);
               
                if (propAt.isCollection()) {
                  logger.info("Reader: attribute lists are not supported yet!");
                } else {
                    handlePropertyAttribute(attBuilder, propVar, beanClass, propAt, target, set);
                }
            } else if (prop instanceof RuntimeReferencePropertyInfo) {
View Full Code Here

Examples of com.sun.xml.bind.v2.model.runtime.RuntimeAttributePropertyInfo

        } else {
            throw new BuildException("Unknown property accessor type '" + accessor.getClass().getName() + "' for property " + property);
        }

        if (runtimePropertyInfo instanceof RuntimeAttributePropertyInfo) {
            RuntimeAttributePropertyInfo attributeProperty = (RuntimeAttributePropertyInfo) runtimePropertyInfo;
            property.setXmlStyle(Property.XmlStyle.ATTRIBUTE);
            property.setXmlName(attributeProperty.getXmlName());
            property.setRequired(attributeProperty.isRequired());
            if (property.isCollection()) property.setXmlList(true);
        } else if (runtimePropertyInfo instanceof RuntimeElementPropertyInfo) {
            RuntimeElementPropertyInfo elementProperty = (RuntimeElementPropertyInfo) runtimePropertyInfo;
            property.setXmlStyle(Property.XmlStyle.ELEMENT);
            if (!elementProperty.isValueList()) {
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.