Class DefaultXmlDeserializer<CLASS>

    • Constructor Detail

      • DefaultXmlDeserializer

        public DefaultXmlDeserializer​(@NonNull
                                      IAssemblyClassBinding classBinding)
        Construct a new Module binding-based deserializer that reads XML-based Module content.
        Parameters:
        classBinding - the assembly class binding describing the Java objects this deserializer parses data into
    • Method Detail

      • setXMLInputFactory

        protected void setXMLInputFactory​(@NonNull
                                          org.codehaus.stax2.XMLInputFactory2 factory)
        Provide a XML input factory instance that will be used to create XML parser instances.
        Parameters:
        factory - the factory instance
      • deserializeToValue

        public final CLASS deserializeToValue​(Reader reader,
                                              URI documentUri)
                                       throws IOException
        Description copied from interface: IDeserializer
        Read data from the Reader into a node item instance.
        Parameters:
        reader - the reader to read from
        documentUri - the URI of the document to read from
        Returns:
        a new node item
        Throws:
        IOException - if an error occurred while reading data from the stream
      • getBindingContext

        @NonNull
        protected IBindingContext getBindingContext()
        Retrieve the binding context associated with the serializer.
        Returns:
        the binding context
      • getClassBinding

        @NonNull
        protected IAssemblyClassBinding getClassBinding()
        Retrieve the bound class information associated with the assembly that the serializer/deserializer will write/read data from.
        Returns:
        the class binding for the Module assembly
      • configurationChanged

        protected void configurationChanged​(@NonNull
                                            IMutableConfiguration<T> config)
      • getConfiguration

        @NonNull
        protected IMutableConfiguration<T> getConfiguration()
        Get the current configuration of the serializer/deserializer.
        Returns:
        the configuration