com.sun.xml.internal.bind.v2.runtime.reflect.ListIterator Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.runtime.reflect.ListIterator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ArrayReferenceNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #2
Source File: ArrayReferenceNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #3
Source File: ArrayReferenceNodeProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #4
Source File: ArrayReferenceNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #5
Source File: ArrayReferenceNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #6
Source File: ArrayReferenceNodeProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #7
Source File: ArrayReferenceNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #8
Source File: ArrayReferenceNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
    ListIterator<ItemT> itr = lister.iterator(list, w);

    while(itr.hasNext()) {
        try {
            ItemT item = itr.next();
            if (item != null) {
                if(isMixed && item.getClass()==String.class) {
                    w.text((String)item,null);
                } else {
                    JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
                    if(bi.jaxbType==Object.class && domHandler!=null)
                        // even if 'v' is a DOM node, it always derive from Object,
                        // so the getBeanInfo returns BeanInfo for Object
                        w.writeDom(item,domHandler,o,fieldName);
                    else
                        bi.serializeRoot(item,w);
                }
            }
        } catch (JAXBException e) {
            w.reportError(fieldName,e);
            // recover by ignoring this item
        }
    }
}
 
Example #9
Source File: ArrayElementProperty.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #10
Source File: ArrayElementProperty.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #11
Source File: ArrayElementProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #12
Source File: ArrayElementProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #13
Source File: ArrayElementProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #14
Source File: ArrayElementProperty.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #15
Source File: ArrayElementProperty.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }
 
Example #16
Source File: ArrayElementProperty.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
        ListIterator<ItemT> itr = lister.iterator(list, w);

        boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    Class itemType = item.getClass();
                    if(isIdref)
                        // This should be the only place where we need to be aware
                        // that the iterator is iterating IDREFS.
                        itemType = ((Lister.IDREFSIterator)itr).last().getClass();

                    // normally, this returns non-null
                    TagAndType tt = typeMap.get(itemType);
                    while(tt==null && itemType!=null) {
                        // otherwise we'll just have to try the slow way
                        itemType = itemType.getSuperclass();
                        tt = typeMap.get(itemType);
                    }

                    if(tt==null) {
                        // item is not of the expected type.
//                        w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
//                            Messages.UNEXPECTED_JAVA_TYPE.format(
//                                item.getClass().getName(),
//                                getExpectedClassNameList()
//                            ),
//                            w.getCurrentLocation(fieldName)));
//                        continue;

                        // see the similar code in SingleElementNodeProperty.
                        // for the purpose of simple type substitution, make it a non-error

                        w.startElement(typeMap.values().iterator().next().tagName,null);
                        w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
                    } else {
                        w.startElement(tt.tagName,null);
                        serializeItem(tt.beanInfo,item,w);
                    }

                    w.endElement();
                } else {
                    if(nillableTagName!=null) {
                        w.startElement(nillableTagName,null);
                        w.writeXsiNilTrue();
                        w.endElement();
                    }
                }
            } catch (JAXBException e) {
                w.reportError(fieldName,e);
                // recover by ignoring this item
            }
        }
    }