Package javax.xml.bind.annotation

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


            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 {
                    property.setType(helper.getJavaClass(element.type()));
                }
                property.setHasXmlElementType(true);
            }
View Full Code Here


            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 {
                    property.setType(helper.getJavaClass(element.type()));
                }
                property.setHasXmlElementType(true);
            }
            // handle default value
            if (!element.defaultValue().equals(ELEMENT_DECL_DEFAULT)) {
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

    private Class<?> getConcreteTypeFromXmlElementAnno(Class<?> type, Annotation[] annotations) {
        Class<?> ret = xmlElementConcreteClassCache.get(type);
        if (ret == null) {
            XmlElement xmlElement = getXmlElementAnno(type, annotations);
            if (xmlElement != null) {
                Class<?> xmlElementType = xmlElement.type();
                if (xmlElementType != null) {
                    ret = xmlElementType;
                }
            }
            if (ret == null)
View Full Code Here

        Annotation[][] paramAnnotations = method.getParameterAnnotations();
        for (Annotation[] annos : paramAnnotations) {
            for (Annotation anno : annos) {
                if (anno.annotationType().equals(XmlElement.class)) {
                    XmlElement xmlElement = (XmlElement)anno;
                    Type type = xmlElement.type();
                    if (type != null) {
                        paramTypes[index] = type;
                    }
                }
            }
View Full Code Here

         // TODO XmlElement on this property?..
         XmlElement propXmlElement = property.getUnderlyingAnnotation(XmlElement.class);
         if (propXmlElement != null)
         {
            propClassInfo = (ClassInfo) propClassInfo.getTypeInfoFactory().getTypeInfo(propXmlElement.type());
         }

         JBossXmlModelGroup xmlModelGroup = propClassInfo.getUnderlyingAnnotation(JBossXmlModelGroup.class);
         if (xmlModelGroup != null && xmlModelGroup.particles().length == 0)
         {
View Full Code Here

                  String memberName = null;
                  XmlElement memberXmlElement = memberProp.getUnderlyingAnnotation(XmlElement.class);
                  if (memberXmlElement != null)
                  {
                     if (!XmlElement.DEFAULT.class.equals(memberXmlElement.type()))
                     {
                        memberTypeInfo = memberTypeInfo.getTypeInfoFactory().getTypeInfo(memberXmlElement.type());
                     }

                     if (memberNamespace == null)
View Full Code Here

                  XmlElement memberXmlElement = memberProp.getUnderlyingAnnotation(XmlElement.class);
                  if (memberXmlElement != null)
                  {
                     if (!XmlElement.DEFAULT.class.equals(memberXmlElement.type()))
                     {
                        memberTypeInfo = memberTypeInfo.getTypeInfoFactory().getTypeInfo(memberXmlElement.type());
                     }

                     if (memberNamespace == null)
                        memberNamespace = memberXmlElement.namespace();
                     memberName = memberXmlElement.name();
View Full Code Here

                  if (memberProp.getType().isCollection())
                  {
                     memberPropertyHandler = new CollectionPropertyHandler(memberProp, memberProp.getType());
                     isCol = true;
                     // if memberXmlElement is present then the collection item type is set explicitly
                     if (memberXmlElement == null || XmlElement.DEFAULT.class.equals(memberXmlElement.type()))
                     {
                        JBossXmlCollection jbossXmlCollection = memberProp
                              .getUnderlyingAnnotation(JBossXmlCollection.class);
                        if (jbossXmlCollection != null)
                        {
View Full Code Here

    /* false for class, package, super-class, since annotation can
     * only be attached to fields and methods
     */
    // Note: caller does necessary sub/supertype checks
    XmlElement annotation = findAnnotation(XmlElement.class, a, false, false, false);
    if (annotation == null || annotation.type() == XmlElement.DEFAULT.class) {
      return null;
    }
    /* [JACKSON-436]: Apparently collection types (array, Collection, maybe Map)
     *   require type definition to relate to contents, not collection type
     *   itself. So; we must return null here for those cases, and modify content
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.