public void startUnmappedElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { if ((null != selfRecords) || (null == xmlReader) || isSelfRecord()) { return; } Class unmappedContentHandlerClass = getUnmarshaller().getUnmappedContentHandlerClass(); UnmappedContentHandler unmappedContentHandler; if (null == unmappedContentHandlerClass) { unmappedContentHandler = DEFAULT_UNMAPPED_CONTENT_HANDLER; } else { try { PrivilegedNewInstanceFromClass privilegedNewInstanceFromClass = new PrivilegedNewInstanceFromClass(unmappedContentHandlerClass); unmappedContentHandler = (UnmappedContentHandler)privilegedNewInstanceFromClass.run(); } catch (ClassCastException e) { throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } } UnmappedContentHandlerWrapper unmappedContentHandlerWrapper = new UnmappedContentHandlerWrapper(this, unmappedContentHandler); unmappedContentHandlerWrapper.startElement(namespaceURI, localName, qName, atts); xmlReader.setContentHandler(unmappedContentHandlerWrapper); }
protected void processComplexElement() throws SAXException { getParent().unmappedContent(); Class unmappedContentHandlerClass = getParent().getUnmarshaller().getUnmappedContentHandlerClass(); UnmappedContentHandler unmappedContentHandler; if (null == unmappedContentHandlerClass) { unmappedContentHandler = UnmarshalRecord.DEFAULT_UNMAPPED_CONTENT_HANDLER; } else { try { PrivilegedNewInstanceFromClass privilegedNewInstanceFromClass = new PrivilegedNewInstanceFromClass(unmappedContentHandlerClass); unmappedContentHandler = (UnmappedContentHandler)privilegedNewInstanceFromClass.run(); } catch (ClassCastException e) { throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } } UnmappedContentHandlerWrapper unmappedContentHandlerWrapper = new UnmappedContentHandlerWrapper(getParent(), unmappedContentHandler); executeEvents(unmappedContentHandlerWrapper); } }
protected void processComplexElement() throws SAXException { getParent().unmappedContent(); Class unmappedContentHandlerClass = getParent().getUnmarshaller().getUnmappedContentHandlerClass(); UnmappedContentHandler unmappedContentHandler; if (null == unmappedContentHandlerClass) { unmappedContentHandler = UnmarshalRecord.DEFAULT_UNMAPPED_CONTENT_HANDLER; } else { try { PrivilegedNewInstanceFromClass privilegedNewInstanceFromClass = new PrivilegedNewInstanceFromClass(unmappedContentHandlerClass); unmappedContentHandler = (UnmappedContentHandler)privilegedNewInstanceFromClass.run(); } catch (ClassCastException e) { throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } } UnmappedContentHandlerWrapper unmappedContentHandlerWrapper = new UnmappedContentHandlerWrapper(getParent(), unmappedContentHandler); executeEvents(unmappedContentHandlerWrapper); } }
protected void processComplexElement() throws SAXException { getParent().unmappedContent(); Class unmappedContentHandlerClass = getParent().getUnmarshaller().getUnmappedContentHandlerClass(); UnmappedContentHandler unmappedContentHandler; if (null == unmappedContentHandlerClass) { unmappedContentHandler = UnmarshalRecord.DEFAULT_UNMAPPED_CONTENT_HANDLER; } else { try { PrivilegedNewInstanceFromClass privilegedNewInstanceFromClass = new PrivilegedNewInstanceFromClass(unmappedContentHandlerClass); unmappedContentHandler = (UnmappedContentHandler)privilegedNewInstanceFromClass.run(); } catch (ClassCastException e) { throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } } UnmappedContentHandlerWrapper unmappedContentHandlerWrapper = new UnmappedContentHandlerWrapper(getParent(), unmappedContentHandler); executeEvents(unmappedContentHandlerWrapper); } }
throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());
throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());
throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());
throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());
throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName()); } catch (IllegalAccessException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName()); } catch (InstantiationException e) { throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());