This class takes care of the logic that allows code to obtain UnmarshallingContext and XMLSerializer instances during the unmarshalling/marshalling.
This is done by using a ThreadLocal .
Each JAXB-bound class has a corresponding JaxBeanInfo object, which performs all the JAXB related operations on behalf of the JAXB-bound object.
Given a class, the corresponding JaxBeanInfo can be located via JAXBContextImpl.getBeanInfo(Classboolean) .
Typically, JaxBeanInfo implementations should be generated by XJC/JXC.
This interface extends NamespaceContext and provides an additional functionality, which is necessary to declare namespaced attributes on elements.
On the user classes the SwA handling is done by using the XmlAttachmentRef annotation, but internally we treat it as a XmlJavaTypeAdapter with this adapter class.
This object coordinates the overall marshalling efforts across different content-tree objects and different target formats.
The following CFG gives the proper sequence of method invocation.
MARSHALLING := ELEMENT ELEMENT := "startElement" NSDECL* "endNamespaceDecls" ATTRIBUTE* "endAttributes" BODY "endElement" NSDECL := "declareNamespace" ATTRIBUTE := "attribute" ATTVALUES := "text"* BODY := ( "text" | ELEMENT )*
A marshalling of one element consists of two stages.