Java源码示例:com.sun.xml.internal.bind.v2.model.core.TypeInfoSet
示例1
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例2
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例3
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例4
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例5
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例6
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例7
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例8
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例9
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例10
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例11
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例12
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例13
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例14
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例15
public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
this.navigator = navigator;
this.types = types;
this.stringType = types.getTypeInfo(navigator.ref(String.class));
this.anyType = types.getAnyTypeInfo();
// populate the object
for( ClassInfo<T,C> ci : types.beans().values() )
add(ci);
for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
add(ei1);
for( EnumLeafInfo<T,C> ei : types.enums().values() )
add(ei);
for( ArrayInfo<T,C> a : types.arrays().values())
add(a);
}
示例16
/**
* Called after all the classes are added to the type set
* to "link" them together.
*
* <p>
* Don't expose implementation classes in the signature.
*
* @return
* fully built {@link TypeInfoSet} that represents the model,
* or null if there was an error.
*/
public TypeInfoSet<T,C,F,M> link() {
assert !linked;
linked = true;
for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
ei.link();
for( ClassInfoImpl ci : typeInfoSet.beans().values() )
ci.link();
for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
li.link();
if(hadError)
return null;
else
return typeInfoSet;
}
示例17
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例18
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例19
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例20
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例21
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例22
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例23
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例24
public J2SJAXBModel bind(
Collection<Reference> rootClasses,
Map<QName,Reference> additionalElementDecls,
String defaultNamespaceRemap,
ProcessingEnvironment env) {
ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
InlineAnnotationReaderImpl.theInstance,
new ApNavigator(env),
Collections.<TypeElement, TypeElement>emptyMap(),
defaultNamespaceRemap );
builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
for ( Reference ref : rootClasses ) {
TypeMirror t = ref.type;
XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
XmlList xl = ref.annotations.getAnnotation(XmlList.class);
builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
}
TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
if(r==null) return null;
if(additionalElementDecls==null)
additionalElementDecls = Collections.emptyMap();
else {
// fool proof check
for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
if(e.getKey()==null)
throw new IllegalArgumentException("nulls in additionalElementDecls");
}
}
return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
示例25
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
Collection<Reference> rootClasses,
Map<QName, Reference> additionalElementDecls) {
this.types = types;
this.reader = reader;
this.additionalElementDecls = additionalElementDecls;
Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
classList.add(i.getName());
}
for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
String javaName = navigator.getTypeName(a.getType());
classList.add(javaName);
}
for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
QName tn = l.getTypeName();
if(tn!=null) {
String javaName = navigator.getTypeName(l.getType());
classList.add(javaName);
}
}
for (Reference ref : rootClasses)
refMap.put(ref,getXmlType(ref));
// check for collision between "additional" ones and the ones given to JAXB
// and eliminate duplication
Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry<QName, Reference> entry = itr.next();
if(entry.getValue()==null) continue;
NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
assert xt!=null;
refMap.put(entry.getValue(),xt);
if(xt instanceof ClassInfo) {
ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
Element<TypeMirror, TypeElement> elem = xct.asElement();
if(elem!=null && elem.getElementName().equals(entry.getKey())) {
itr.remove();
continue;
}
}
ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
if(ei!=null && ei.getContentType()==xt)
itr.remove();
}
}
示例26
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
Collection<Reference> rootClasses,
Map<QName, Reference> additionalElementDecls) {
this.types = types;
this.reader = reader;
this.additionalElementDecls = additionalElementDecls;
Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
classList.add(i.getName());
}
for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
String javaName = navigator.getTypeName(a.getType());
classList.add(javaName);
}
for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
QName tn = l.getTypeName();
if(tn!=null) {
String javaName = navigator.getTypeName(l.getType());
classList.add(javaName);
}
}
for (Reference ref : rootClasses)
refMap.put(ref,getXmlType(ref));
// check for collision between "additional" ones and the ones given to JAXB
// and eliminate duplication
Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry<QName, Reference> entry = itr.next();
if(entry.getValue()==null) continue;
NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
assert xt!=null;
refMap.put(entry.getValue(),xt);
if(xt instanceof ClassInfo) {
ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
Element<TypeMirror, TypeElement> elem = xct.asElement();
if(elem!=null && elem.getElementName().equals(entry.getKey())) {
itr.remove();
continue;
}
}
ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
if(ei!=null && ei.getContentType()==xt)
itr.remove();
}
}
示例27
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
Collection<Reference> rootClasses,
Map<QName, Reference> additionalElementDecls) {
this.types = types;
this.reader = reader;
this.additionalElementDecls = additionalElementDecls;
Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
classList.add(i.getName());
}
for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
String javaName = navigator.getTypeName(a.getType());
classList.add(javaName);
}
for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
QName tn = l.getTypeName();
if(tn!=null) {
String javaName = navigator.getTypeName(l.getType());
classList.add(javaName);
}
}
for (Reference ref : rootClasses)
refMap.put(ref,getXmlType(ref));
// check for collision between "additional" ones and the ones given to JAXB
// and eliminate duplication
Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry<QName, Reference> entry = itr.next();
if(entry.getValue()==null) continue;
NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
assert xt!=null;
refMap.put(entry.getValue(),xt);
if(xt instanceof ClassInfo) {
ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
Element<TypeMirror, TypeElement> elem = xct.asElement();
if(elem!=null && elem.getElementName().equals(entry.getKey())) {
itr.remove();
continue;
}
}
ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
if(ei!=null && ei.getContentType()==xt)
itr.remove();
}
}
示例28
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
Collection<Reference> rootClasses,
Map<QName, Reference> additionalElementDecls) {
this.types = types;
this.reader = reader;
this.additionalElementDecls = additionalElementDecls;
Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
classList.add(i.getName());
}
for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
String javaName = navigator.getTypeName(a.getType());
classList.add(javaName);
}
for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
QName tn = l.getTypeName();
if(tn!=null) {
String javaName = navigator.getTypeName(l.getType());
classList.add(javaName);
}
}
for (Reference ref : rootClasses)
refMap.put(ref,getXmlType(ref));
// check for collision between "additional" ones and the ones given to JAXB
// and eliminate duplication
Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry<QName, Reference> entry = itr.next();
if(entry.getValue()==null) continue;
NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
assert xt!=null;
refMap.put(entry.getValue(),xt);
if(xt instanceof ClassInfo) {
ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
Element<TypeMirror, TypeElement> elem = xct.asElement();
if(elem!=null && elem.getElementName().equals(entry.getKey())) {
itr.remove();
continue;
}
}
ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
if(ei!=null && ei.getContentType()==xt)
itr.remove();
}
}
示例29
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
Collection<Reference> rootClasses,
Map<QName, Reference> additionalElementDecls) {
this.types = types;
this.reader = reader;
this.additionalElementDecls = additionalElementDecls;
Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
classList.add(i.getName());
}
for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
String javaName = navigator.getTypeName(a.getType());
classList.add(javaName);
}
for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
QName tn = l.getTypeName();
if(tn!=null) {
String javaName = navigator.getTypeName(l.getType());
classList.add(javaName);
}
}
for (Reference ref : rootClasses)
refMap.put(ref,getXmlType(ref));
// check for collision between "additional" ones and the ones given to JAXB
// and eliminate duplication
Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry<QName, Reference> entry = itr.next();
if(entry.getValue()==null) continue;
NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
assert xt!=null;
refMap.put(entry.getValue(),xt);
if(xt instanceof ClassInfo) {
ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
Element<TypeMirror, TypeElement> elem = xct.asElement();
if(elem!=null && elem.getElementName().equals(entry.getKey())) {
itr.remove();
continue;
}
}
ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
if(ei!=null && ei.getContentType()==xt)
itr.remove();
}
}
示例30
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
Collection<Reference> rootClasses,
Map<QName, Reference> additionalElementDecls) {
this.types = types;
this.reader = reader;
this.additionalElementDecls = additionalElementDecls;
Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
classList.add(i.getName());
}
for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
String javaName = navigator.getTypeName(a.getType());
classList.add(javaName);
}
for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
QName tn = l.getTypeName();
if(tn!=null) {
String javaName = navigator.getTypeName(l.getType());
classList.add(javaName);
}
}
for (Reference ref : rootClasses)
refMap.put(ref,getXmlType(ref));
// check for collision between "additional" ones and the ones given to JAXB
// and eliminate duplication
Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry<QName, Reference> entry = itr.next();
if(entry.getValue()==null) continue;
NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
assert xt!=null;
refMap.put(entry.getValue(),xt);
if(xt instanceof ClassInfo) {
ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
Element<TypeMirror, TypeElement> elem = xct.asElement();
if(elem!=null && elem.getElementName().equals(entry.getKey())) {
itr.remove();
continue;
}
}
ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
if(ei!=null && ei.getContentType()==xt)
itr.remove();
}
}