Java源码示例:com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator
示例1
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;
}
示例2
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;
}
示例3
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;
}
示例4
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;
}
示例5
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;
}
示例6
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;
}
示例7
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;
}
示例8
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;
}
示例9
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;
}
示例10
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;
}
示例11
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;
}
示例12
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;
}
示例13
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;
}
示例14
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;
}
示例15
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;
}
示例16
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;
}