open class Jaxb2Marshaller : MimeMarshaller, MimeUnmarshaller, GenericMarshaller, GenericUnmarshaller, BeanClassLoaderAware, InitializingBean
Implementation of the GenericMarshaller interface for JAXB 2.2.
The typical usage will be to set either the "contextPath" or the "classesToBeBound" property on this bean, possibly customize the marshaller and unmarshaller by setting properties, schemas, adapters, and listeners, and to refer to it.
Author
Arjen Poutsma
Author
Juergen Hoeller
Author
Rossen Stoyanchev
Since
3.0
See Also
#setContextPath(String)#setClassesToBeBound(Class[])#setJaxbContextProperties(Map)#setMarshallerProperties(Map)#setUnmarshallerProperties(Map)#setSchema(Resource)#setSchemas(Resource[])#setMarshallerListener(javax.xml.bind.Marshaller.Listener)#setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener)#setAdapters(XmlAdapter[])
Jaxb2Marshaller()
Implementation of the The typical usage will be to set either the "contextPath" or the "classesToBeBound" property on this bean, possibly customize the marshaller and unmarshaller by setting properties, schemas, adapters, and listeners, and to refer to it. |
open fun afterPropertiesSet(): Unit |
|
open fun getClassesToBeBound(): Array<Class<*>>
Return the list of Java classes to be recognized by a newly created JAXBContext. |
|
open fun getContextPath(): String
Return the JAXB context path. |
|
open fun getJaxbContext(): JAXBContext
Return the JAXBContext used by this marshaller, lazily building it if necessary. |
|
open fun getPackagesToScan(): Array<String>
Return the packages to search for JAXB2 annotations. |
|
open fun isProcessExternalEntities(): Boolean
Returns the configured value for whether XML external entities are allowed. |
|
open fun isSupportDtd(): Boolean
Whether DTD parsing is supported. |
|
open fun marshal(graph: Any, result: Result): Unitopen fun marshal(graph: Any, result: Result, mimeContainer: MimeContainer): Unit |
|
open fun setAdapters(vararg adapters: XmlAdapter<*, *>): Unit
Specify the |
|
open fun setBeanClassLoader(classLoader: ClassLoader): Unit |
|
open fun setCheckForXmlRootElement(checkForXmlRootElement: Boolean): Unit
Specify whether the Default is |
|
open fun setClassesToBeBound(vararg classesToBeBound: Class<*>): Unit
Set the list of Java classes to be recognized by a newly created JAXBContext. Setting either this property, |
|
open fun setContextPath(contextPath: String): Unit
Set a JAXB context path. Setting either this property, |
|
open fun setContextPaths(vararg contextPaths: String): Unit
Set multiple JAXB context paths. The given array of context paths gets converted to a colon-delimited string, as supported by JAXB. |
|
open fun setJaxbContextProperties(jaxbContextProperties: MutableMap<String, *>): Unit
Set the |
|
open fun setLazyInit(lazyInit: Boolean): Unit
Set whether to lazily initialize the JAXBContext for this marshaller. Default is Early initialization just applies if |
|
open fun setMappedClass(mappedClass: Class<*>): Unit
Specify a JAXB mapped class for partial unmarshalling. |
|
open fun setMarshallerListener(marshallerListener: Listener): Unit
Specify the |
|
open fun setMarshallerProperties(properties: MutableMap<String, *>): Unit
Set the JAXB |
|
open fun setMtomEnabled(mtomEnabled: Boolean): Unit
Specify whether MTOM support should be enabled or not. Default is |
|
open fun setPackagesToScan(vararg packagesToScan: String): Unit
Set the packages to search for classes with JAXB2 annotations in the classpath. This is using a Spring-bases search and therefore analogous to Spring's component-scan feature (org.springframework.context.annotation.ClassPathBeanDefinitionScanner). Setting either this property, |
|
open fun setProcessExternalEntities(processExternalEntities: Boolean): Unit
Indicates whether external XML entities are processed when unmarshalling. Default is Note: setting this option to |
|
open fun setSchema(schemaResource: Resource): Unit
Set the schema resource to use for validation. |
|
open fun setSchemaLanguage(schemaLanguage: String): Unit
Set the schema language. Default is the W3C XML Schema: |
|
open fun setSchemaResourceResolver(schemaResourceResolver: LSResourceResolver): Unit
Set the resource resolver, as used to load the schema resources. |
|
open fun setSchemas(vararg schemaResources: Resource): Unit
Set the schema resources to use for validation. |
|
open fun setSupportDtd(supportDtd: Boolean): Unit
Indicates whether DTD parsing should be supported. Default is |
|
open fun setSupportJaxbElementClass(supportJaxbElementClass: Boolean): Unit
Specify whether the Default is This property is typically enabled in combination with usage of classes like org.springframework.web.servlet.view.xml.MarshallingView, since the |
|
open fun setUnmarshallerListener(unmarshallerListener: Listener): Unit
Set the |
|
open fun setUnmarshallerProperties(properties: MutableMap<String, *>): Unit
Set the JAXB |
|
open fun setValidationEventHandler(validationEventHandler: ValidationEventHandler): Unit
Set the JAXB validation event handler. This event handler will be called by JAXB if any validation errors are encountered during calls to any of the marshal APIs. |
|
open fun supports(clazz: Class<*>): Booleanopen fun supports(genericType: Type): Boolean |
|
open fun unmarshal(source: Source): Anyopen fun unmarshal(source: Source, mimeContainer: MimeContainer): Any |