ElementBeanInfoImpl(JAXBContextImpl grammar, RuntimeElementInfo rei) { super(grammar,rei,(Class<JAXBElement>)rei.getType(),true,false,true); this.property = PropertyFactory.create(grammar,rei.getProperty()); tagName = rei.getElementName(); expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); if(type==JAXBElement.class) constructor = null; else { try { constructor = type.getConstructor(expectedType); } catch (NoSuchMethodException e) { NoSuchMethodError x = new NoSuchMethodError("Failed to find the constructor for " + type + " with " + expectedType); x.initCause(e); throw x; } } }
/** * Creates a loader handler that unmarshals the body of the item. * * <p> * This will be sandwiched into <item> ... </item>. * * <p> * When unmarshalling the body of item, the Pack of {@link Lister} is available * as the handler state. * * @param chain * @param typeRef */ private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) { if(PropertyFactory.isLeaf(typeRef.getSource())) { final Transducer xducer = typeRef.getTransducer(); return new TextLoader(xducer); } else { return refs.get(typeRef).getLoader(chain.context,true); } }
boolean isLeaf = isLeaf(info);
boolean elementOnly = true; for( RuntimePropertyInfo info : ps ) { Property p = PropertyFactory.create(owner,info); if(info.id()==ID.ID) idProperty = p;
/** * Creates a loader handler that unmarshals the body of the item. * * <p> * This will be sandwiched into <item> ... </item>. * * <p> * When unmarshalling the body of item, the Pack of {@link Lister} is available * as the handler state. * * @param chain * @param typeRef */ private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) { if(PropertyFactory.isLeaf(typeRef.getSource())) { final Transducer xducer = typeRef.getTransducer(); return new TextLoader(xducer); } else { return refs.get(typeRef).getLoader(chain.context,true); } }
ElementBeanInfoImpl(JAXBContextImpl grammar, RuntimeElementInfo rei) { super(grammar,rei,(Class<JAXBElement>)rei.getType(),true,false,true); this.property = PropertyFactory.create(grammar,rei.getProperty()); tagName = rei.getElementName(); expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); if(type==JAXBElement.class) constructor = null; else { try { constructor = type.getConstructor(expectedType); } catch (NoSuchMethodException e) { NoSuchMethodError x = new NoSuchMethodError("Failed to find the constructor for " + type + " with " + expectedType); x.initCause(e); throw x; } } }
boolean isLeaf = isLeaf(info);
boolean elementOnly = true; for( RuntimePropertyInfo info : ps ) { Property p = PropertyFactory.create(owner,info); if(info.id()==ID.ID) idProperty = p;
/** * Creates a loader handler that unmarshals the body of the item. * * <p> * This will be sandwiched into <item> ... </item>. * * <p> * When unmarshalling the body of item, the Pack of {@link Lister} is available * as the handler state. * * @param chain * @param typeRef */ private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) { if(PropertyFactory.isLeaf(typeRef.getSource())) { final Transducer xducer = typeRef.getTransducer(); return new TextLoader(xducer); } else { return refs.get(typeRef).getLoader(chain.context,true); } }
ElementBeanInfoImpl(JAXBContextImpl grammar, RuntimeElementInfo rei) { super(grammar,rei,(Class<JAXBElement>)rei.getType(),true,false,true); this.property = PropertyFactory.create(grammar,rei.getProperty()); tagName = rei.getElementName(); expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); if(type==JAXBElement.class) constructor = null; else { try { constructor = type.getConstructor(expectedType); } catch (NoSuchMethodException e) { NoSuchMethodError x = new NoSuchMethodError("Failed to find the constructor for " + type + " with " + expectedType); x.initCause(e); throw x; } } }
/** * Creates a loader handler that unmarshals the body of the item. * * <p> * This will be sandwiched into <item> ... </item>. * * <p> * When unmarshalling the body of item, the Pack of {@link Lister} is available * as the handler state. * * @param chain * @param typeRef */ private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) { if(PropertyFactory.isLeaf(typeRef.getSource())) { final Transducer xducer = typeRef.getTransducer(); return new TextLoader(xducer); } else { return refs.get(typeRef).getLoader(chain.context,true); } }
ElementBeanInfoImpl(JAXBContextImpl grammar, RuntimeElementInfo rei) { super(grammar,rei,(Class<JAXBElement>)rei.getType(),true,false,true); this.property = PropertyFactory.create(grammar,rei.getProperty()); tagName = rei.getElementName(); expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); if(type==JAXBElement.class) constructor = null; else { try { constructor = type.getConstructor(expectedType); } catch (NoSuchMethodException e) { NoSuchMethodError x = new NoSuchMethodError("Failed to find the constructor for " + type + " with " + expectedType); x.initCause(e); throw x; } } }
boolean isLeaf = isLeaf(info);
boolean elementOnly = true; for( RuntimePropertyInfo info : ps ) { Property p = PropertyFactory.create(owner,info); if(info.id()==ID.ID) idProperty = p;
boolean isLeaf = isLeaf(info);
boolean elementOnly = true; for( RuntimePropertyInfo info : ps ) { Property p = PropertyFactory.create(owner,info); if(info.id()==ID.ID) idProperty = p;