Class Loader

    • Field Detail

      • expectText

        protected boolean expectText
    • Constructor Detail

      • Loader

        protected Loader​(boolean expectText)
      • Loader

        protected Loader()
    • Method Detail

      • startElement

        public void startElement​(UnmarshallingContext.State state,
                                 TagName ea)
                          throws org.xml.sax.SAXException
        Called when the loader is activated, which is when a new start tag is seen and when the parent designated this loader as the child loader.

        The callee may change state.loader to designate another Loader for the processing. It's the responsibility of the callee to forward the startElement event in such a case.

        Parameters:
        ea - info about the start tag. never null.
        Throws:
        org.xml.sax.SAXException
      • childElement

        public void childElement​(UnmarshallingContext.State state,
                                 TagName ea)
                          throws org.xml.sax.SAXException
        Called when this loaderis an active loaderand we see a new child start tag.

        The callee is expected to designate another loaderas a loaderthat processes this element, then it should also register a Receiver. The designated loaderwill become an active loader.

        The default implementation reports an error saying an element is unexpected.

        Throws:
        org.xml.sax.SAXException
      • reportUnexpectedChildElement

        protected final void reportUnexpectedChildElement​(TagName ea,
                                                          boolean canRecover)
                                                   throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • getExpectedChildElements

        public java.util.Collection<javax.xml.namespace.QName> getExpectedChildElements()
        Returns a set of tag names expected as possible child elements in this context.
      • getExpectedAttributes

        public java.util.Collection<javax.xml.namespace.QName> getExpectedAttributes()
        Returns a set of tag names expected as possible child elements in this context.
      • text

        public void text​(UnmarshallingContext.State state,
                         java.lang.CharSequence text)
                  throws org.xml.sax.SAXException
        Called when this loaderis an active loaderand we see a chunk of text. The runtime makes sure that adjacent characters (even those separated by comments, PIs, etc) are reported as one event. IOW, you won't see two text event calls in a row.
        Throws:
        org.xml.sax.SAXException
      • leaveElement

        public void leaveElement​(UnmarshallingContext.State state,
                                 TagName ea)
                          throws org.xml.sax.SAXException
        Called when this loaderis an active loaderand we see an end tag.
        Throws:
        org.xml.sax.SAXException
      • fireBeforeUnmarshal

        protected final void fireBeforeUnmarshal​(JaxBeanInfo beanInfo,
                                                 java.lang.Object child,
                                                 UnmarshallingContext.State state)
                                          throws org.xml.sax.SAXException
        Fires the beforeUnmarshal event if necessary.
        Parameters:
        state - state of the newly create child object.
        Throws:
        org.xml.sax.SAXException
      • fireAfterUnmarshal

        protected final void fireAfterUnmarshal​(JaxBeanInfo beanInfo,
                                                java.lang.Object child,
                                                UnmarshallingContext.State state)
                                         throws org.xml.sax.SAXException
        Fires the afterUnmarshal event if necessary.
        Parameters:
        state - state of the parent object
        Throws:
        org.xml.sax.SAXException
      • handleGenericException

        protected static void handleGenericException​(java.lang.Exception e)
                                              throws org.xml.sax.SAXException
        Last resort when something goes terribly wrong within the unmarshaller.
        Throws:
        org.xml.sax.SAXException
      • handleGenericException

        public static void handleGenericException​(java.lang.Exception e,
                                                  boolean canRecover)
                                           throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • handleGenericError

        public static void handleGenericError​(java.lang.Error e)
                                       throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • reportError

        protected static void reportError​(java.lang.String msg,
                                          boolean canRecover)
                                   throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • reportError

        public static void reportError​(java.lang.String msg,
                                       java.lang.Exception nested,
                                       boolean canRecover)
                                throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • handleParseConversionException

        protected static void handleParseConversionException​(UnmarshallingContext.State state,
                                                             java.lang.Exception e)
                                                      throws org.xml.sax.SAXException
        This method is called by the generated derived class when a datatype parse method throws an exception.
        Throws:
        org.xml.sax.SAXException