spring-framework / org.springframework.oxm.jaxb / Jaxb2Marshaller / setSupportJaxbElementClass

setSupportJaxbElementClass

open fun setSupportJaxbElementClass(supportJaxbElementClass: Boolean): Unit

Specify whether the #supports(Class) returns true for the JAXBElement class.

Default is false, meaning that supports(Class) always returns false for JAXBElement classes (though #supports(Type) can return true, since it can obtain the type parameters of JAXBElement).

This property is typically enabled in combination with usage of classes like org.springframework.web.servlet.view.xml.MarshallingView, since the ModelAndView does not offer type parameter information at runtime.

See Also
#supports(Class)#supports(Type)