Class XmlContext


  • public class XmlContext
    extends java.lang.Object
    Context for XML marhalling of source object.
    Author:
    Daniel Sagenschneider
    • Field Detail

      • elementName

        protected final java.lang.String elementName
        Name of the element.
      • contexts

        protected final java.util.Map<java.lang.Class<?>,​XmlSpecificContext> contexts
        Mapping of concrete class to specific context instance to handling mappings.
      • configuration

        protected final XmlMappingMetaData[] configuration
        Configuration for the specific configuration.
      • childContexts

        protected java.util.Map<java.lang.String,​XmlContext> childContexts
        Child XmlContext instances of this XmlContext. Lazy loaded as may not always have children.
    • Constructor Detail

      • XmlContext

        public XmlContext​(java.lang.Class<?> upperType,
                          java.lang.String elementName,
                          XmlMappingMetaData[] configuration,
                          boolean isCreateSpecificType,
                          TranslatorRegistry translatorRegistry,
                          ReferencedXmlMappingRegistry referenceRegistry)
                   throws XmlMarshallException
        Initiate the XmlContext from configuration.
        Parameters:
        upperType - Upper bound on the type of the source object being marshalled.
        elementName - Name of XML element for wrapping the context.
        configuration - Configuration of this XmlContext.
        isCreateSpecificType - Flags whether the initial specific type is created.
        translatorRegistry - Registry of Translator instances for translating objects to string values.
        referenceRegistry - Registry of XmlMapping that may be referenced.
        Throws:
        XmlMarshallException - Should this XmlContext fail to configure.