private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) { JaxBeanInfo bi = beanInfos.get(rei); if(bi!=null) return (ElementBeanInfoImpl)bi; // all elements share the same type, so we can't register them to beanInfoMap return new ElementBeanInfoImpl(this, rei); }
public final JAXBElement createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException { return createInstanceFromValue(null); }
@Override public void link(JAXBContextImpl grammar) { super.link(grammar); getLoader(grammar,true); // make sure to build them, if we hadn't done so } }
public void serializeRoot(JAXBElement e, XMLSerializer target) throws SAXException, IOException, XMLStreamException { serializeBody(e,target); }
@Override public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { state.setLoader(core); state.setIntercepter(this); // TODO: make sure there aren't too many duplicate of this code // create the object to unmarshal Object child; UnmarshallingContext context = state.getContext(); // let's see if we can reuse the existing peer object child = context.getOuterPeer(); if(child!=null && jaxbType!=child.getClass()) child = null; // unexpected type. if(child!=null) reset((JAXBElement)child,context); if(child==null) child = context.createInstance(ElementBeanInfoImpl.this); fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state); context.recordOuterPeer(child); UnmarshallingContext.State p = state.getPrev(); p.setBackup(p.getTarget()); p.setTarget(child); core.startElement(state,ea); }
public void serializeRoot(JAXBElement e, XMLSerializer target) throws SAXException, IOException, XMLStreamException { serializeBody(e,target); }
@Override public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { state.setLoader(core); state.setIntercepter(this); // TODO: make sure there aren't too many duplicate of this code // create the object to unmarshal Object child; UnmarshallingContext context = state.getContext(); // let's see if we can reuse the existing peer object child = context.getOuterPeer(); if(child!=null && jaxbType!=child.getClass()) child = null; // unexpected type. if(child!=null) reset((JAXBElement)child,context); if(child==null) child = context.createInstance(ElementBeanInfoImpl.this); fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state); context.recordOuterPeer(child); UnmarshallingContext.State p = state.getPrev(); p.setBackup(p.getTarget()); p.setTarget(child); core.startElement(state,ea); }
beanInfoMap.put(JAXBElement.class,new ElementBeanInfoImpl(this));
public void set(BeanT bean, Object value) throws AccessorException { if(value!=null) { try { value = ebi.createInstanceFromValue(value); } catch (IllegalAccessException e) { throw new AccessorException(e); } catch (InvocationTargetException e) { throw new AccessorException(e); } catch (InstantiationException e) { throw new AccessorException(e); } } acc.set(bean,(ValueT)value); } };
@Override public void link(JAXBContextImpl grammar) { super.link(grammar); getLoader(grammar,true); // make sure to build them, if we hadn't done so } }
public void serializeRoot(JAXBElement e, XMLSerializer target) throws SAXException, IOException, XMLStreamException { serializeBody(e,target); }
@Override public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { state.setLoader(core); state.setIntercepter(this); // TODO: make sure there aren't too many duplicate of this code // create the object to unmarshal Object child; UnmarshallingContext context = state.getContext(); // let's see if we can reuse the existing peer object child = context.getOuterPeer(); if(child!=null && jaxbType!=child.getClass()) child = null; // unexpected type. if(child!=null) reset((JAXBElement)child,context); if(child==null) child = context.createInstance(ElementBeanInfoImpl.this); fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state); context.recordOuterPeer(child); UnmarshallingContext.State p = state.getPrev(); p.setBackup(p.getTarget()); p.setTarget(child); core.startElement(state,ea); }
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) { JaxBeanInfo bi = beanInfos.get(rei); if(bi!=null) return (ElementBeanInfoImpl)bi; // all elements share the same type, so we can't register them to beanInfoMap return new ElementBeanInfoImpl(this, rei); }
public final JAXBElement createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException { return createInstanceFromValue(null); }
@Override public void link(JAXBContextImpl grammar) { super.link(grammar); getLoader(grammar,true); // make sure to build them, if we hadn't done so } }
public void serializeRoot(JAXBElement e, XMLSerializer target) throws SAXException, IOException, XMLStreamException { serializeBody(e,target); }
@Override public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { state.setLoader(core); state.setIntercepter(this); // TODO: make sure there aren't too many duplicate of this code // create the object to unmarshal Object child; UnmarshallingContext context = state.getContext(); // let's see if we can reuse the existing peer object child = context.getOuterPeer(); if(child!=null && jaxbType!=child.getClass()) child = null; // unexpected type. if(child!=null) reset((JAXBElement)child,context); if(child==null) child = context.createInstance(ElementBeanInfoImpl.this); fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state); context.recordOuterPeer(child); UnmarshallingContext.State p = state.getPrev(); p.setBackup(p.getTarget()); p.setTarget(child); core.startElement(state,ea); }
beanInfoMap.put(JAXBElement.class,new ElementBeanInfoImpl(this));
public void set(BeanT bean, Object value) throws AccessorException { if(value!=null) { try { value = ebi.createInstanceFromValue(value); } catch (IllegalAccessException e) { throw new AccessorException(e); } catch (InvocationTargetException e) { throw new AccessorException(e); } catch (InstantiationException e) { throw new AccessorException(e); } } acc.set(bean,(ValueT)value); } };
@Override public void link(JAXBContextImpl grammar) { super.link(grammar); getLoader(grammar,true); // make sure to build them, if we hadn't done so } }