public void setJAXBObject(Object obj) { if (value == null) value = new ArrayList<Object>(); if (jaxbObject != null && value != null) value.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { value.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { value.add(obj); } jaxbObject = obj; }
JAXBContext jaxb = getJAXBContext(type, mediaType); jaxb = getJAXBContextFinder(type, annotations, mediaType); unmarshaller = decorateUnmarshaller(type, annotations, mediaType, unmarshaller); if (needsSecurity()) if (getCharset(mediaType) == null) unmarshaller = new SecureUnmarshaller(unmarshaller, isDisableExternalEntities(), isEnableSecureProcessingFeature(), isDisableDTDs()); obj = unmarshaller.unmarshal(source); if (getCharset(mediaType) == null)
final Object factory = findObjectFactory(type); Method[] method; if (System.getSecurityManager() == null)
public void setAnyOtherJAXBObject(Object obj) { if (anyOther == null) anyOther = new ArrayList<Object>(); if (anyOtherJaxbObject != null && anyOther != null) anyOther.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { anyOther.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { anyOther.add(obj); } anyOtherJaxbObject = obj; } }
public void setJAXBObject(Object obj) { if (value == null) value = new ArrayList<Object>(); if (jaxbObject != null && value != null) value.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { value.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { value.add(obj); } jaxbObject = obj; } }
/** * */ @Override public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException { LogMessages.LOGGER.debugf("Provider : %s, Method : writeTo", getClass().getName()); JAXBElement<?> result = wrapInJAXBElement(t, type); super.writeTo(result, type, genericType, annotations, mediaType, httpHeaders, entityStream); }
public void setAnyOtherJAXBObject(Object obj) { if (anyOther == null) anyOther = new ArrayList(); if (anyOtherJaxbObject != null && anyOther != null) anyOther.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { anyOther.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { anyOther.add(obj); } anyOtherJaxbObject = obj; } }
public void setJAXBObject(Object obj) { if (value == null) value = new ArrayList(); if (jaxbObject != null && value != null) value.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { value.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { value.add(obj); } jaxbObject = obj; }
public void setJAXBObject(Object obj) { if (value == null) value = new ArrayList<Object>(); if (jaxbObject != null && value != null) value.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { value.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { value.add(obj); } jaxbObject = obj; }
public void setJAXBObject(Object obj) { if (value == null) value = new ArrayList<Object>(); if (jaxbObject != null && value != null) value.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { value.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { value.add(obj); } jaxbObject = obj; } }
public void setAnyOtherJAXBObject(Object obj) { if (anyOther == null) anyOther = new ArrayList<Object>(); if (anyOtherJaxbObject != null && anyOther != null) anyOther.clear(); if (!obj.getClass().isAnnotationPresent(XmlRootElement.class) && obj.getClass().isAnnotationPresent(XmlType.class)) { anyOther.add(JAXBXmlTypeProvider.wrapInJAXBElement(obj, obj.getClass())); } else { anyOther.add(obj); } anyOtherJaxbObject = obj; } }