com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo. 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: ElementBeanInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #2
Source File: ElementBeanInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #3
Source File: ElementBeanInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #4
Source File: ElementBeanInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #5
Source File: ElementBeanInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #6
Source File: ElementBeanInfoImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #7
Source File: ElementBeanInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #8
Source File: ElementBeanInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
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;
        }
    }
}
 
Example #9
Source File: JAXBContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #10
Source File: JAXBContextImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #11
Source File: JAXBContextImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #12
Source File: JAXBContextImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #13
Source File: JAXBContextImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #14
Source File: JAXBContextImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #15
Source File: JAXBContextImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #16
Source File: JAXBContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #17
Source File: JAXBContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #18
Source File: JAXBContextImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #19
Source File: JAXBContextImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #20
Source File: JAXBContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #21
Source File: JAXBContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #22
Source File: JAXBContextImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}
 
Example #23
Source File: JAXBContextImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
    JaxBeanInfo bi = beanInfos.get(rei);
    if(bi!=null)    return (ElementBeanInfoImpl)bi;

    // all elements share the same type, so we can't register them to beanInfoMap
    return new ElementBeanInfoImpl(this, rei);
}
 
Example #24
Source File: JAXBContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
    RuntimeTypeInfoSet tis;
    try {
        tis = getTypeInfoSet();
    } catch (IllegalAnnotationsException e) {
        // this shouldn't happen because we've already
        throw new AssertionError(e);
    }

    XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
            new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);

    // JAX-RPC uses Bridge objects that collide with
    // @XmlRootElement.
    // we will avoid collision here
    Set<QName> rootTagNames = new HashSet<QName>();
    for (RuntimeElementInfo ei : tis.getAllElements()) {
        rootTagNames.add(ei.getElementName());
    }
    for (RuntimeClassInfo ci : tis.beans().values()) {
        if(ci.isElement())
            rootTagNames.add(ci.asElement().getElementName());
    }

    for (TypeReference tr : bridges.keySet()) {
        if(rootTagNames.contains(tr.tagName))
            continue;

        if(tr.type==void.class || tr.type==Void.class) {
            xsdgen.add(tr.tagName,false,null);
        } else
        if(tr.type==CompositeStructure.class) {
            // this is a special class we introduced for JAX-WS that we *don't* want in the schema
        } else {
            NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
            xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
        }
    }
    return xsdgen;
}