Examples of XmlJavaTypeAdapter


Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

                        return (XmlJavaTypeAdapter)a;
                    }
                }
            }
        }
        XmlJavaTypeAdapter xjta = clazz.getAnnotation(XmlJavaTypeAdapter.class);
        if (xjta != null) {
            ret = findFromTypeAdapter(xjta.value());
            if (ret != null) {
                return xjta;
            }
        }
        return null;
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

            endTag = "}";
        }
       
        os.write(startTag.getBytes());
        if (firstObj != null) {
            XmlJavaTypeAdapter adapter =
                org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(firstObj.getClass(), anns);
            marshalCollectionMember(JAXBUtils.useAdapter(firstObj, adapter, true),
                                    actualClass, genericType, encoding, os);
            while (it.hasNext()) {
                os.write(",".getBytes());
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

        if (JAXBElement.class.isAssignableFrom(type)) {
            theType = InjectionUtils.getActualType(genericType);
        } else {
            theType = type;
        }
        XmlJavaTypeAdapter adapter = org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(theType, anns);
        theType = org.apache.cxf.jaxrs.utils.JAXBUtils.getTypeFromAdapter(adapter, theType, false);
       
        return theType;
    }
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

       
        return theType;
    }
   
    protected static Object checkAdapter(Object obj, Class<?> cls, Annotation[] anns, boolean marshal) {
        XmlJavaTypeAdapter adapter = org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(cls, anns);
        return org.apache.cxf.jaxrs.utils.JAXBUtils.useAdapter(obj, adapter, marshal);
    }
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

        if (JAXBElement.class.isAssignableFrom(type)) {
            theType = InjectionUtils.getActualType(genericType);
        } else {
            theType = type;
        }
        XmlJavaTypeAdapter adapter = org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(theType, anns);
        theType = org.apache.cxf.jaxrs.utils.JAXBUtils.getTypeFromAdapter(adapter, theType, false);
       
        return theType;
    }
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

       
        return theType;
    }
   
    protected static Object checkAdapter(Object obj, Class<?> cls, Annotation[] anns, boolean marshal) {
        XmlJavaTypeAdapter adapter = org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(cls, anns);
        return org.apache.cxf.jaxrs.utils.JAXBUtils.useAdapter(obj, adapter, marshal);
    }
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

            startTag = "<" + qname.getLocalPart() + ">";
            endTag = "</" + qname.getLocalPart() + ">";
        }
        os.write(startTag.getBytes());
        if (firstObj != null) {
            XmlJavaTypeAdapter adapter =
                org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(firstObj.getClass(), anns);
            marshalCollectionMember(JAXBUtils.useAdapter(firstObj, adapter, true),
                                    actualClass, genericType, enc, os, m,
                                    qname.getNamespaceURI());
            while (it.hasNext()) {
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

                if (XmlJavaTypeAdapter.class.isAssignableFrom(a.annotationType())) {
                    inspectTypeAdapter(((XmlJavaTypeAdapter)a).value());
                }
            }
        }
        XmlJavaTypeAdapter xjta = clazz.getAnnotation(XmlJavaTypeAdapter.class);
        if (xjta != null) {
            inspectTypeAdapter(xjta.value());
        }
       
    }
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

                    if (xsa != null) {
                        for (Class c : xsa.value()) {
                            addClass(c);
                        }
                    }
                    XmlJavaTypeAdapter xjta = cls.getAnnotation(XmlJavaTypeAdapter.class);
                    if (xjta != null) {
                        Class<? extends XmlAdapter> c2 = xjta.value();
                        inspectTypeAdapter(c2);
                    }
                } else if (classes.contains(cls)) {
                    return;
                } else {
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

    public static Class<?> getValueType(Class<?> cls) {
        if (cls == null) {
            return null;
        }
        if (cls.isInterface()) {
            XmlJavaTypeAdapter adapter = cls.getAnnotation(XmlJavaTypeAdapter.class);
            return getValueType(adapter);
        } else {
            return cls;
        }
    }
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.