Class ObjectXmlMapping

    • Field Detail

      • elementName

        protected final java.lang.String elementName
        Name of XML element for this mapping.
    • Constructor Detail

      • ObjectXmlMapping

        public ObjectXmlMapping​(java.lang.String elementName,
                                java.lang.reflect.Method getMethod,
                                java.lang.Class<?> upperType,
                                XmlMappingMetaData[] configuration,
                                java.lang.String contextReference,
                                XmlContext context,
                                TranslatorRegistry translatorRegistry,
                                ReferencedXmlMappingRegistry referenceRegistry)
                         throws XmlMarshallException
        Initiate the object XML mapping.
        elementName - Name of XML element for this mapping or null if no element.
        getMethod - Method to obtain the object to map.
        upperType - Upper bound type for this mapping.
        configuration - Configuration for the object being mapped.
        contextReference - Reference by which to register the context as a child context.
        context - Current context to register the object's child context.
        referenceRegistry - Registry of XmlMapping that may be referenced.
        translatorRegistry - Registry of Translator instances.
        XmlMarshallException - If fails to configure.
    • Method Detail

      • writeXml

        public void writeXml​(java.lang.Object object,
                             XmlOutput output)
                      throws XmlMarshallException
        Description copied from interface: XmlWriter
        Writes the XML for the input object.
        object - Object to have XML written for it.
        output - Output to write the XML.
        XmlMarshallException - If fails to write the object into XML.