com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator. 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: JAXBModelImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #2
Source File: JAXBModelImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #3
Source File: JAXBModelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #4
Source File: JAXBModelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #5
Source File: JAXBModelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #6
Source File: JAXBModelImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #7
Source File: JAXBModelImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #8
Source File: JAXBModelImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
    if(xsdgen==null) {
        xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);

        for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
            Reference value = e.getValue();
            if(value!=null) {
                NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
                if(typeInfo==null)
                    throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
                TypeMirror type = value.type;
                xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
            } else {
                xsdgen.add(e.getKey(),false,null);
            }
        }
    }
    return xsdgen;
}
 
Example #9
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;
}
 
Example #10
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 #11
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 #12
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 #13
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 #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 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 #16
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;
}