public static Object convertWithAdapter(Object obj, Class<?> adapterClass, Annotation[] anns) { return useAdapter(obj, getAdapter(adapterClass, anns), false, obj); }
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); }
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); }
public static Object convertWithAdapter(Object obj, Class<?> adapterClass, Annotation[] anns) { return useAdapter(obj, getAdapter(adapterClass, anns), false, obj); }
protected Class<?> getActualType(Class<?> type, Type genericType, Annotation[] anns) { Class<?> theType = null; 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; }
protected Class<?> getActualType(Class<?> type, Type genericType, Annotation[] anns) { Class<?> theType = null; 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; }
public static Class<?> getValueTypeFromAdapter(Class<?> expectedBoundType, Class<?> defaultClass, Annotation[] anns) { try { XmlJavaTypeAdapter adapter = getAdapter(expectedBoundType, anns); if (adapter != null) { Class<?> boundType = JAXBUtils.getTypeFromAdapter(adapter, null, true); if (boundType != null && boundType.isAssignableFrom(expectedBoundType)) { return JAXBUtils.getTypeFromAdapter(adapter, null, false); } } } catch (Throwable ex) { // ignore } return defaultClass; }
protected boolean isSupported(Class<?> type, Type genericType, Annotation[] anns) { if (jaxbElementClassMap != null && jaxbElementClassMap.containsKey(type.getName()) || isSkipJaxbChecks()) { return true; } if (UNSUPPORTED_CLASSES.contains(type)) { return false; } return isXmlRoot(type) || JAXBElement.class.isAssignableFrom(type) || objectFactoryOrIndexAvailable(type) || (type != genericType && objectFactoryForType(genericType)) || org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(type, anns) != null; }
protected boolean isSupported(Class<?> type, Type genericType, Annotation[] anns) { if (jaxbElementClassMap != null && jaxbElementClassMap.containsKey(type.getName()) || isSkipJaxbChecks()) { return true; } return isXmlRoot(type) || JAXBElement.class.isAssignableFrom(type) || objectFactoryOrIndexAvailable(type) || (type != genericType && objectFactoryForType(genericType)) || org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(type, anns) != null; }
public static Class<?> getValueTypeFromAdapter(Class<?> expectedBoundType, Class<?> defaultClass, Annotation[] anns) { try { XmlJavaTypeAdapter adapter = getAdapter(expectedBoundType, anns); if (adapter != null) { Class<?> boundType = JAXBUtils.getTypeFromAdapter(adapter, null, true); if (boundType != null && boundType.isAssignableFrom(expectedBoundType)) { return JAXBUtils.getTypeFromAdapter(adapter, null, false); } } } catch (Throwable ex) { // ignore } return defaultClass; }
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, anns, m,
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,
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);
if (firstObj != null) { XmlJavaTypeAdapter adapter = org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(firstObj.getClass(), anns); this.executeMarshalCollectionMember(JAXBUtils.useAdapter(firstObj, adapter, true), actualClass, genericType, encoding, os);
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);
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);
org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(theGenericType, anns)); } else { response = checkAdapter(response, type, anns, false);
org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(theGenericType, anns)); } else { response = checkAdapter(response, type, anns, false);
response = ((CollectionWrapper)response).getCollectionOrArray( unmarshaller, theType, type, genericType, org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(theGenericType, anns)); } else { response = checkAdapter(response, type, anns, false);
response = ((CollectionWrapper)response).getCollectionOrArray( unmarshaller, theType, type, genericType, org.apache.cxf.jaxrs.utils.JAXBUtils.getAdapter(theGenericType, anns)); } else { response = checkAdapter(response, type, anns, false);