Java Code Examples for com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef#isNillable()
The following examples show how to use
com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef#isNillable() .
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: SingleElementNodeProperty.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 2
Source File: ArrayElementProperty.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 3
Source File: SingleElementNodeProperty.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 4
Source File: ArrayElementProperty.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 5
Source File: SingleElementNodeProperty.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 6
Source File: ArrayElementProperty.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 7
Source File: SingleElementNodeProperty.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 8
Source File: ArrayElementProperty.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 9
Source File: SingleElementNodeProperty.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 10
Source File: ArrayElementProperty.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 11
Source File: SingleElementNodeProperty.java From hottub with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 12
Source File: ArrayElementProperty.java From hottub with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 13
Source File: SingleElementNodeProperty.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 14
Source File: ArrayElementProperty.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }
Example 15
Source File: SingleElementNodeProperty.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); this.prop = prop; QName nt = null; boolean nil = false; acceptedElements = new QName[prop.getTypes().size()]; for( int i=0; i<acceptedElements.length; i++ ) acceptedElements[i] = prop.getTypes().get(i).getTagName(); for (RuntimeTypeRef e : prop.getTypes()) { JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget()); if(nt==null) nt = e.getTagName(); typeNames.put( beanInfo.jaxbType, new TagAndType( context.nameBuilder.createElementName(e.getTagName()),beanInfo) ); nil |= e.isNillable(); } nullTagName = context.nameBuilder.createElementName(nt); nillable = nil; }
Example 16
Source File: ArrayElementProperty.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) { super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable()); this.prop = prop; List<? extends RuntimeTypeRef> types = prop.getTypes(); Name n = null; for (RuntimeTypeRef typeRef : types) { Class type = (Class)typeRef.getTarget().getType(); if(type.isPrimitive()) type = RuntimeUtil.primitiveToBox.get(type); JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget()); TagAndType tt = new TagAndType( grammar.nameBuilder.createElementName(typeRef.getTagName()), beanInfo); typeMap.put(type,tt); refs.put(typeRef,beanInfo); if(typeRef.isNillable() && n==null) n = tt.tagName; } nillableTagName = n; }