} catch( SAXException e ) { coordinator.clearStates(); throw createUnmarshalException(e);
public final Object unmarshal0( Node node, JaxBeanInfo expectedType ) throws JAXBException { try { final DOMScanner scanner = new DOMScanner(); InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null,false,expectedType)); scanner.setContentHandler(new SAXConnector(handler,scanner)); if(node.getNodeType() == Node.ELEMENT_NODE) { scanner.scan((Element)node); } else if(node.getNodeType() == Node.DOCUMENT_NODE) { scanner.scan((Document)node); } else { throw new IllegalArgumentException("Unexpected node type: "+node); } Object retVal = handler.getContext().getResult(); handler.getContext().clearResult(); return retVal; } catch( SAXException e ) { throw createUnmarshalException(e); } }
private Object associativeUnmarshal(XmlNode xmlNode, boolean inplace, Class expectedType) throws JAXBException { if (xmlNode == null) throw new IllegalArgumentException(); JaxBeanInfo bi = null; if(expectedType!=null) bi = context.getBeanInfo(expectedType, true); InterningXmlVisitor handler = new InterningXmlVisitor( getUnmarshaller().createUnmarshallerHandler(scanner,inplace,bi)); scanner.setContentHandler(new SAXConnector(handler,scanner.getLocator())); try { scanner.scan(xmlNode); } catch( SAXException e ) { throw unmarshaller.createUnmarshalException(e); } return handler.getContext().getResult(); }
} catch( SAXException e ) { coordinator.clearStates(); throw createUnmarshalException(e);
public final Object unmarshal0( Node node, JaxBeanInfo expectedType ) throws JAXBException { try { final DOMScanner scanner = new DOMScanner(); InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null,false,expectedType)); scanner.setContentHandler(new SAXConnector(handler,scanner)); if(node.getNodeType() == Node.ELEMENT_NODE) { scanner.scan((Element)node); } else if(node.getNodeType() == Node.DOCUMENT_NODE) { scanner.scan((Document)node); } else { throw new IllegalArgumentException("Unexpected node type: "+node); } Object retVal = handler.getContext().getResult(); handler.getContext().clearResult(); return retVal; } catch( SAXException e ) { throw createUnmarshalException(e); } }
private Object associativeUnmarshal(XmlNode xmlNode, boolean inplace, Class expectedType) throws JAXBException { if (xmlNode == null) throw new IllegalArgumentException(); JaxBeanInfo bi = null; if(expectedType!=null) bi = context.getBeanInfo(expectedType, true); InterningXmlVisitor handler = new InterningXmlVisitor( getUnmarshaller().createUnmarshallerHandler(scanner,inplace,bi)); scanner.setContentHandler(new SAXConnector(handler,scanner.getLocator())); try { scanner.scan(xmlNode); } catch( SAXException e ) { throw unmarshaller.createUnmarshalException(e); } return handler.getContext().getResult(); }
} catch( SAXException e ) { coordinator.clearStates(); throw createUnmarshalException(e);
} catch( SAXException e ) { coordinator.clearStates(); throw createUnmarshalException(e);
public final Object unmarshal0( Node node, JaxBeanInfo expectedType ) throws JAXBException { try { final DOMScanner scanner = new DOMScanner(); InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null,false,expectedType)); scanner.setContentHandler(new SAXConnector(handler,scanner)); if(node.getNodeType() == Node.ELEMENT_NODE) { scanner.scan((Element)node); } else if(node.getNodeType() == Node.DOCUMENT_NODE) { scanner.scan((Document)node); } else { throw new IllegalArgumentException("Unexpected node type: "+node); } Object retVal = handler.getContext().getResult(); handler.getContext().clearResult(); return retVal; } catch( SAXException e ) { throw createUnmarshalException(e); } }
public final Object unmarshal0( Node node, JaxBeanInfo expectedType ) throws JAXBException { try { final DOMScanner scanner = new DOMScanner(); InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null,false,expectedType)); scanner.setContentHandler(new SAXConnector(handler,scanner)); if(node.getNodeType() == Node.ELEMENT_NODE) { scanner.scan((Element)node); } else if(node.getNodeType() == Node.DOCUMENT_NODE) { scanner.scan((Document)node); } else { throw new IllegalArgumentException("Unexpected node type: "+node); } Object retVal = handler.getContext().getResult(); handler.getContext().clearResult(); return retVal; } catch( SAXException e ) { throw createUnmarshalException(e); } }
private Object associativeUnmarshal(XmlNode xmlNode, boolean inplace, Class expectedType) throws JAXBException { if (xmlNode == null) throw new IllegalArgumentException(); JaxBeanInfo bi = null; if(expectedType!=null) bi = context.getBeanInfo(expectedType, true); InterningXmlVisitor handler = new InterningXmlVisitor( getUnmarshaller().createUnmarshallerHandler(scanner,inplace,bi)); scanner.setContentHandler(new SAXConnector(handler,scanner.getLocator())); try { scanner.scan(xmlNode); } catch( SAXException e ) { throw unmarshaller.createUnmarshalException(e); } return handler.getContext().getResult(); }
private Object associativeUnmarshal(XmlNode xmlNode, boolean inplace, Class expectedType) throws JAXBException { if (xmlNode == null) throw new IllegalArgumentException(); JaxBeanInfo bi = null; if(expectedType!=null) bi = context.getBeanInfo(expectedType, true); InterningXmlVisitor handler = new InterningXmlVisitor( getUnmarshaller().createUnmarshallerHandler(scanner,inplace,bi)); scanner.setContentHandler(new SAXConnector(handler,scanner.getLocator())); try { scanner.scan(xmlNode); } catch( SAXException e ) { throw unmarshaller.createUnmarshalException(e); } return handler.getContext().getResult(); }