public BeanT parse(CharSequence lexical) throws AccessorException, SAXException { UnmarshallingContext ctxt = UnmarshallingContext.getInstance(); BeanT inst; if(ctxt!=null) inst = (BeanT)ctxt.createInstance(ownerClass); else // when this runs for parsing enum constants, // there's no UnmarshallingContext. inst = ClassFactory.create(ownerClass); xacc.parse(inst,lexical); return inst; }
child = context.createInstance(beanInfo);
@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 BeanT parse(CharSequence lexical) throws AccessorException, SAXException { UnmarshallingContext ctxt = UnmarshallingContext.getInstance(); BeanT inst; if(ctxt!=null) inst = (BeanT)ctxt.createInstance(ownerClass); else // when this runs for parsing enum constants, // there's no UnmarshallingContext. inst = ClassFactory.create(ownerClass); xacc.parse(inst,lexical); return inst; }
child = context.createInstance(beanInfo);
@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 BeanT parse(CharSequence lexical) throws AccessorException, SAXException { UnmarshallingContext ctxt = UnmarshallingContext.getInstance(); BeanT inst; if(ctxt!=null) inst = (BeanT)ctxt.createInstance(ownerClass); else // when this runs for parsing enum constants, // there's no UnmarshallingContext. inst = ClassFactory.create(ownerClass); xacc.parse(inst,lexical); return inst; }
public BeanT parse(CharSequence lexical) throws AccessorException, SAXException { UnmarshallingContext ctxt = UnmarshallingContext.getInstance(); BeanT inst; if(ctxt!=null) inst = (BeanT)ctxt.createInstance(ownerClass); else // when this runs for parsing enum constants, // there's no UnmarshallingContext. inst = ClassFactory.create(ownerClass); xacc.parse(inst,lexical); return inst; }
child = context.createInstance(beanInfo);
child = context.createInstance(beanInfo);
@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); }
@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); }