Class JaxbParser

  • All Implemented Interfaces:
    TypeParser, org.xml.sax.ContentHandler

    public class JaxbParser
    extends ExtParser
    A parser for JAXB objects.
    • Field Detail

      • context

        private final javax.xml.bind.JAXBContext context
      • handler

        private javax.xml.bind.UnmarshallerHandler handler
    • Constructor Detail

      • JaxbParser

        public JaxbParser​(javax.xml.bind.JAXBContext pContext)
        Creates a new instance with the given context.
        Parameters:
        pContext - The context being used for creating unmarshallers.
    • Method Detail

      • getExtHandler

        protected org.xml.sax.ContentHandler getExtHandler()
                                                    throws org.xml.sax.SAXException
        Description copied from class: ExtParser
        Returns a content handler for parsing the actual contents.
        Specified by:
        getExtHandler in class ExtParser
        Returns:
        A SAX handler for parsing the XML inside the outer ex:foo element.
        Throws:
        org.xml.sax.SAXException - Creating the handler failed.
      • getTagName

        protected java.lang.String getTagName()
        Description copied from class: ExtParser
        Returns the outer node name.
        Specified by:
        getTagName in class ExtParser
      • getResult

        public java.lang.Object getResult()
                                   throws XmlRpcException
        Description copied from interface: TypeParser
        Returns the parsed object.
        Returns:
        The parameter or result object.
        Throws:
        XmlRpcException - Creating the result object failed.