public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); l = new DefaultValueLoaderDecorator(l, defaultValue); handlers.put(tagName, new ChildLoader(l,null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); if (defaultValue != null) l = new DefaultValueLoaderDecorator(l, defaultValue); if (nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l, acc); // LeafPropertyXsiLoader doesn't work well with nillable elements if (improvedXsiTypeHandling) l = new LeafPropertyXsiLoader(l, xacc, acc); handlers.put(tagName, new ChildLoader(l, null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { JAXBContextImpl context = chain.context; for (TypeRef<Type,Class> e : prop.getTypes()) { JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget()); // if the expected Java type is already final, type substitution won't really work anyway. // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int' Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers())); if(e.getDefaultValue()!=null) l = new DefaultValueLoaderDecorator(l,e.getDefaultValue()); if(nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l,acc); handlers.put( e.getTagName(), new ChildLoader(l,acc)); } }
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) { // all items go to the same lister, // so they should share the same offset. int offset = chain.allocateOffset(); Receiver recv = new ReceiverImpl(offset); for (RuntimeTypeRef typeRef : prop.getTypes()) { Name tagName = chain.context.nameBuilder.createElementName(typeRef.getTagName()); Loader item = createItemUnmarshaller(chain,typeRef); if(typeRef.isNillable() || chain.context.allNillable) item = new XsiNilLoader.Array(item); if(typeRef.getDefaultValue()!=null) item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue()); loaders.put(tagName,new ChildLoader(item,recv)); } }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); l = new DefaultValueLoaderDecorator(l, defaultValue); handlers.put(tagName, new ChildLoader(l,null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); if (defaultValue != null) l = new DefaultValueLoaderDecorator(l, defaultValue); if (nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l, acc); // LeafPropertyXsiLoader doesn't work well with nillable elements if (improvedXsiTypeHandling) l = new LeafPropertyXsiLoader(l, xacc, acc); handlers.put(tagName, new ChildLoader(l, null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { JAXBContextImpl context = chain.context; for (TypeRef<Type,Class> e : prop.getTypes()) { JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget()); // if the expected Java type is already final, type substitution won't really work anyway. // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int' Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers())); if(e.getDefaultValue()!=null) l = new DefaultValueLoaderDecorator(l,e.getDefaultValue()); if(nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l,acc); handlers.put( e.getTagName(), new ChildLoader(l,acc)); } }
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) { // all items go to the same lister, // so they should share the same offset. int offset = chain.allocateOffset(); Receiver recv = new ReceiverImpl(offset); for (RuntimeTypeRef typeRef : prop.getTypes()) { Name tagName = chain.context.nameBuilder.createElementName(typeRef.getTagName()); Loader item = createItemUnmarshaller(chain,typeRef); if(typeRef.isNillable() || chain.context.allNillable) item = new XsiNilLoader.Array(item); if(typeRef.getDefaultValue()!=null) item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue()); loaders.put(tagName,new ChildLoader(item,recv)); } }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); l = new DefaultValueLoaderDecorator(l, defaultValue); handlers.put(tagName, new ChildLoader(l,null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); l = new DefaultValueLoaderDecorator(l, defaultValue); handlers.put(tagName, new ChildLoader(l,null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); if (defaultValue != null) l = new DefaultValueLoaderDecorator(l, defaultValue); if (nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l, acc); // LeafPropertyXsiLoader doesn't work well with nillable elements if (improvedXsiTypeHandling) l = new LeafPropertyXsiLoader(l, xacc, acc); handlers.put(tagName, new ChildLoader(l, null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { Loader l = new LeafPropertyLoader(xacc); if (defaultValue != null) l = new DefaultValueLoaderDecorator(l, defaultValue); if (nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l, acc); // LeafPropertyXsiLoader doesn't work well with nillable elements if (improvedXsiTypeHandling) l = new LeafPropertyXsiLoader(l, xacc, acc); handlers.put(tagName, new ChildLoader(l, null)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { JAXBContextImpl context = chain.context; for (TypeRef<Type,Class> e : prop.getTypes()) { JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget()); // if the expected Java type is already final, type substitution won't really work anyway. // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int' Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers())); if(e.getDefaultValue()!=null) l = new DefaultValueLoaderDecorator(l,e.getDefaultValue()); if(nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l,acc); handlers.put( e.getTagName(), new ChildLoader(l,acc)); } }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { JAXBContextImpl context = chain.context; for (TypeRef<Type,Class> e : prop.getTypes()) { JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget()); // if the expected Java type is already final, type substitution won't really work anyway. // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int' Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers())); if(e.getDefaultValue()!=null) l = new DefaultValueLoaderDecorator(l,e.getDefaultValue()); if(nillable || chain.context.allNillable) l = new XsiNilLoader.Single(l,acc); handlers.put( e.getTagName(), new ChildLoader(l,acc)); } }
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) { // all items go to the same lister, // so they should share the same offset. int offset = chain.allocateOffset(); Receiver recv = new ReceiverImpl(offset); for (RuntimeTypeRef typeRef : prop.getTypes()) { Name tagName = chain.context.nameBuilder.createElementName(typeRef.getTagName()); Loader item = createItemUnmarshaller(chain,typeRef); if(typeRef.isNillable() || chain.context.allNillable) item = new XsiNilLoader.Array(item); if(typeRef.getDefaultValue()!=null) item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue()); loaders.put(tagName,new ChildLoader(item,recv)); } }
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) { // all items go to the same lister, // so they should share the same offset. int offset = chain.allocateOffset(); Receiver recv = new ReceiverImpl(offset); for (RuntimeTypeRef typeRef : prop.getTypes()) { Name tagName = chain.context.nameBuilder.createElementName(typeRef.getTagName()); Loader item = createItemUnmarshaller(chain,typeRef); if(typeRef.isNillable() || chain.context.allNillable) item = new XsiNilLoader.Array(item); if(typeRef.getDefaultValue()!=null) item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue()); loaders.put(tagName,new ChildLoader(item,recv)); } }