public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // these variables have to be set before they are initialized, // because the initialization may build other loaders and they may refer to this. StructureLoader sl = new StructureLoader(this); loader = sl; if(ci.hasSubClasses()) loaderWithTypeSubst = new XsiTypeLoader(this); else // optimization. we know there can be no @xsi:type loaderWithTypeSubst = loader; sl.init(context,this,ci.getAttributeWildcard()); } if(typeSubstitutionCapable) return loaderWithTypeSubst; else return loader; }
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo); if(beanInfo==null) beanInfo = defaultBeanInfo; Loader loader = beanInfo.getLoader(null,false); state.setLoader(loader); loader.startElement(state,ea); }
reportError(Messages.NOT_A_QNAME.format(value),true); } else { if(defaultBeanInfo!=null && defaultBeanInfo.getTypeNames().contains(type)) reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true); else reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
/** * Receives the root element and determines how to start * unmarshalling. */ @Override public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException { Loader loader = state.getContext().selectRootLoader(state,ea); if(loader!=null) { state.loader = loader; state.receiver = this; return; } // the registry doesn't know about this element. // try its xsi:type JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null); if(beanInfo==null) { // we don't even know its xsi:type reportUnexpectedChildElement(ea,false); return; } state.loader = beanInfo.getLoader(null,false); state.prev.backup = new JAXBElement<Object>(ea.createQName(),Object.class,null); state.receiver = this; }
public LeafBeanInfoImpl(JAXBContextImpl grammar, RuntimeLeafInfo li) { super(grammar,li,li.getClazz(),li.getTypeNames(),li.isElement(),true,false); xducer = li.getTransducer(); loader = new TextLoader(xducer); loaderWithSubst = new XsiTypeLoader(this); if(isElement()) tagName = grammar.nameBuilder.createElementName(li.getElementName()); else tagName = null; }
reportError(Messages.NOT_A_QNAME.format(value),true); } else { if(defaultBeanInfo!=null && defaultBeanInfo.getTypeNames().contains(type)) reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true); else reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo); if(beanInfo==null) beanInfo = defaultBeanInfo; Loader loader = beanInfo.getLoader(null,false); state.setLoader(loader); loader.startElement(state,ea); }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // these variables have to be set before they are initialized, // because the initialization may build other loaders and they may refer to this. StructureLoader sl = new StructureLoader(this); loader = sl; if(ci.hasSubClasses()) loaderWithTypeSubst = new XsiTypeLoader(this); else // optimization. we know there can be no @xsi:type loaderWithTypeSubst = loader; sl.init(context,this,ci.getAttributeWildcard()); } if(typeSubstitutionCapable) return loaderWithTypeSubst; else return loader; }
reportError(Messages.NOT_A_QNAME.format(value),true); } else { if(defaultBeanInfo!=null && defaultBeanInfo.getTypeNames().contains(type)) reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true); else reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
/** * Receives the root element and determines how to start * unmarshalling. */ @Override public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException { Loader loader = state.getContext().selectRootLoader(state,ea); if(loader!=null) { state.loader = loader; state.receiver = this; return; } // the registry doesn't know about this element. // try its xsi:type JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null); if(beanInfo==null) { // we don't even know its xsi:type reportUnexpectedChildElement(ea,false); return; } state.loader = beanInfo.getLoader(null,false); state.prev.backup = new JAXBElement<Object>(ea.createQName(),Object.class,null); state.receiver = this; }
public LeafBeanInfoImpl(JAXBContextImpl grammar, RuntimeLeafInfo li) { super(grammar,li,li.getClazz(),li.getTypeNames(),li.isElement(),true,false); xducer = li.getTransducer(); loader = new TextLoader(xducer); loaderWithSubst = new XsiTypeLoader(this); if(isElement()) tagName = grammar.nameBuilder.createElementName(li.getElementName()); else tagName = null; }
reportError(Messages.NOT_A_QNAME.format(value),true); } else { if(defaultBeanInfo!=null && defaultBeanInfo.getTypeNames().contains(type)) reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true); else reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo); if(beanInfo==null) beanInfo = defaultBeanInfo; Loader loader = beanInfo.getLoader(null,false); state.setLoader(loader); loader.startElement(state,ea); }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // these variables have to be set before they are initialized, // because the initialization may build other loaders and they may refer to this. StructureLoader sl = new StructureLoader(this); loader = sl; if(ci.hasSubClasses()) loaderWithTypeSubst = new XsiTypeLoader(this); else // optimization. we know there can be no @xsi:type loaderWithTypeSubst = loader; sl.init(context,this,ci.getAttributeWildcard()); } if(typeSubstitutionCapable) return loaderWithTypeSubst; else return loader; }
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo); if(beanInfo==null) beanInfo = defaultBeanInfo; Loader loader = beanInfo.getLoader(null,false); state.setLoader(loader); loader.startElement(state,ea); }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // these variables have to be set before they are initialized, // because the initialization may build other loaders and they may refer to this. StructureLoader sl = new StructureLoader(this); loader = sl; if(ci.hasSubClasses()) loaderWithTypeSubst = new XsiTypeLoader(this); else // optimization. we know there can be no @xsi:type loaderWithTypeSubst = loader; sl.init(context,this,ci.getAttributeWildcard()); } if(typeSubstitutionCapable) return loaderWithTypeSubst; else return loader; }
/** * Receives the root element and determines how to start * unmarshalling. */ @Override public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException { Loader loader = state.getContext().selectRootLoader(state,ea); if(loader!=null) { state.loader = loader; state.receiver = this; return; } // the registry doesn't know about this element. // try its xsi:type JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null); if(beanInfo==null) { // we don't even know its xsi:type reportUnexpectedChildElement(ea,false); return; } state.loader = beanInfo.getLoader(null,false); state.prev.backup = new JAXBElement<Object>(ea.createQName(),Object.class,null); state.receiver = this; }
public LeafBeanInfoImpl(JAXBContextImpl grammar, RuntimeLeafInfo li) { super(grammar,li,li.getClazz(),li.getTypeNames(),li.isElement(),true,false); xducer = li.getTransducer(); loader = new TextLoader(xducer); loaderWithSubst = new XsiTypeLoader(this); if(isElement()) tagName = grammar.nameBuilder.createElementName(li.getElementName()); else tagName = null; }
/** * Receives the root element and determines how to start * unmarshalling. */ @Override public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException { Loader loader = state.getContext().selectRootLoader(state,ea); if(loader!=null) { state.loader = loader; state.receiver = this; return; } // the registry doesn't know about this element. // try its xsi:type JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null); if(beanInfo==null) { // we don't even know its xsi:type reportUnexpectedChildElement(ea,false); return; } state.loader = beanInfo.getLoader(null,false); state.prev.backup = new JAXBElement<Object>(ea.createQName(),Object.class,null); state.receiver = this; }
public LeafBeanInfoImpl(JAXBContextImpl grammar, RuntimeLeafInfo li) { super(grammar,li,li.getClazz(),li.getTypeNames(),li.isElement(),true,false); xducer = li.getTransducer(); loader = new TextLoader(xducer); loaderWithSubst = new XsiTypeLoader(this); if(isElement()) tagName = grammar.nameBuilder.createElementName(li.getElementName()); else tagName = null; }