com.sun.tools.internal.xjc.model.CBuiltinLeafInfo Java Examples
The following examples show how to use
com.sun.tools.internal.xjc.model.CBuiltinLeafInfo.
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: MultiWildcardComplexTypeBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #2
Source File: MultiWildcardComplexTypeBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #3
Source File: MultiWildcardComplexTypeBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #4
Source File: MultiWildcardComplexTypeBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #5
Source File: BIConversion.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public TypeUse getTypeUse(XSSimpleType owner) { if(typeUse!=null) return typeUse; JCodeModel cm = getCodeModel(); JDefinedClass a; try { a = cm._class(adapter); a.hide(); // we assume this is given by the user a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow( cm.ref(type))); } catch (JClassAlreadyExistsException e) { a = e.getExistingClass(); } // TODO: it's not correct to say that it adapts from String, // but OTOH I don't think we can compute that. typeUse = TypeUseFactory.adapt( CBuiltinLeafInfo.STRING, new CAdapter(a)); return typeUse; }
Example #6
Source File: MultiWildcardComplexTypeBuilder.java From hottub with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #7
Source File: BIConversion.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public TypeUse getTypeUse(XSSimpleType owner) { if(typeUse!=null) return typeUse; JCodeModel cm = getCodeModel(); JDefinedClass a; try { a = cm._class(adapter); a.hide(); // we assume this is given by the user a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow( cm.ref(type))); } catch (JClassAlreadyExistsException e) { a = e.getExistingClass(); } // TODO: it's not correct to say that it adapts from String, // but OTOH I don't think we can compute that. typeUse = TypeUseFactory.adapt( CBuiltinLeafInfo.STRING, new CAdapter(a)); return typeUse; }
Example #8
Source File: MultiWildcardComplexTypeBuilder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #9
Source File: MultiWildcardComplexTypeBuilder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
Example #10
Source File: BIConversion.java From hottub with GNU General Public License v2.0 | 6 votes |
public TypeUse getTypeUse(XSSimpleType owner) { if(typeUse!=null) return typeUse; JCodeModel cm = getCodeModel(); JDefinedClass a; try { a = cm._class(adapter); a.hide(); // we assume this is given by the user a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow( cm.ref(type))); } catch (JClassAlreadyExistsException e) { a = e.getExistingClass(); } // TODO: it's not correct to say that it adapts from String, // but OTOH I don't think we can compute that. typeUse = TypeUseFactory.adapt( CBuiltinLeafInfo.STRING, new CAdapter(a)); return typeUse; }
Example #11
Source File: BIConversion.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public TypeUse getTypeUse(XSSimpleType owner) { if(typeUse!=null) return typeUse; JCodeModel cm = getCodeModel(); JDefinedClass a; try { a = cm._class(adapter); a.hide(); // we assume this is given by the user a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow( cm.ref(type))); } catch (JClassAlreadyExistsException e) { a = e.getExistingClass(); } // TODO: it's not correct to say that it adapts from String, // but OTOH I don't think we can compute that. typeUse = TypeUseFactory.adapt( CBuiltinLeafInfo.STRING, new CAdapter(a)); return typeUse; }
Example #12
Source File: TypeUseBinder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private TypeUse onDataType(String datatypeLibrary, String type) { DatatypeLib lib = compiler.datatypes.get(datatypeLibrary); if(lib!=null) { TypeUse use = lib.get(type); if(use!=null) return use; } // unknown return CBuiltinLeafInfo.STRING; }
Example #13
Source File: TypeUseBinder.java From hottub with GNU General Public License v2.0 | 5 votes |
private TypeUse onContainer(DContainerPattern p) { TypeUse t=null; for( DPattern child : p ) { TypeUse s = child.accept(this); if(t!=null && t!=s) return CBuiltinLeafInfo.STRING; // heterogenous t = s; } return t; }
Example #14
Source File: TypeUseBinder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private TypeUse onContainer(DContainerPattern p) { TypeUse t=null; for( DPattern child : p ) { TypeUse s = child.accept(this); if(t!=null && t!=s) return CBuiltinLeafInfo.STRING; // heterogenous t = s; } return t; }
Example #15
Source File: BIEnumeration.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** Creates a global enumeration declaration. */ static BIEnumeration create( Element dom, BindInfo parent ) { // create a class in the target package. return new BIEnumeration( dom, new CEnumLeafInfo( parent.model, null, new CClassInfoParent.Package(parent.getTargetPackage()), DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom))); }
Example #16
Source File: TypeUseBinder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private TypeUse onContainer(DContainerPattern p) { TypeUse t=null; for( DPattern child : p ) { TypeUse s = child.accept(this); if(t!=null && t!=s) return CBuiltinLeafInfo.STRING; // heterogenous t = s; } return t; }
Example #17
Source File: BIEnumeration.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** Creates a global enumeration declaration. */ static BIEnumeration create( Element dom, BindInfo parent ) { // create a class in the target package. return new BIEnumeration( dom, new CEnumLeafInfo( parent.model, null, new CClassInfoParent.Package(parent.getTargetPackage()), DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom))); }
Example #18
Source File: BIEnumeration.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** Creates an element-local enumeration declaration. */ static BIEnumeration create( Element dom, BIElement parent ) { // create a class as a nested class return new BIEnumeration( dom, new CEnumLeafInfo( parent.parent.model, null, parent.clazz, DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom) )); }
Example #19
Source File: BIEnumeration.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** Creates an element-local enumeration declaration. */ static BIEnumeration create( Element dom, BIElement parent ) { // create a class as a nested class return new BIEnumeration( dom, new CEnumLeafInfo( parent.parent.model, null, parent.clazz, DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom) )); }
Example #20
Source File: TypeUseBinder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private TypeUse onDataType(String datatypeLibrary, String type) { DatatypeLib lib = compiler.datatypes.get(datatypeLibrary); if(lib!=null) { TypeUse use = lib.get(type); if(use!=null) return use; } // unknown return CBuiltinLeafInfo.STRING; }
Example #21
Source File: SimpleTypeBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public TypeUse unionSimpleType(XSUnionSimpleType type) { boolean isCollection = false; for( int i=0; i<type.getMemberSize(); i++ ) if(type.getMember(i).getVariety()==XSVariety.LIST || type.getMember(i).getVariety()==XSVariety.UNION) { isCollection = true; break; } TypeUse r = CBuiltinLeafInfo.STRING; if(isCollection) r = TypeUseFactory.makeCollection(r); return r; }
Example #22
Source File: TypeUseBinder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private TypeUse onContainer(DContainerPattern p) { TypeUse t=null; for( DPattern child : p ) { TypeUse s = child.accept(this); if(t!=null && t!=s) return CBuiltinLeafInfo.STRING; // heterogenous t = s; } return t; }
Example #23
Source File: TypeUseBinder.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private TypeUse onContainer(DContainerPattern p) { TypeUse t=null; for( DPattern child : p ) { TypeUse s = child.accept(this); if(t!=null && t!=s) return CBuiltinLeafInfo.STRING; // heterogenous t = s; } return t; }
Example #24
Source File: SimpleTypeBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public TypeUse unionSimpleType(XSUnionSimpleType type) { boolean isCollection = false; for( int i=0; i<type.getMemberSize(); i++ ) if(type.getMember(i).getVariety()==XSVariety.LIST || type.getMember(i).getVariety()==XSVariety.UNION) { isCollection = true; break; } TypeUse r = CBuiltinLeafInfo.STRING; if(isCollection) r = TypeUseFactory.makeCollection(r); return r; }
Example #25
Source File: BIEnumeration.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** Creates an element-local enumeration declaration. */ static BIEnumeration create( Element dom, BIElement parent ) { // create a class as a nested class return new BIEnumeration( dom, new CEnumLeafInfo( parent.parent.model, null, parent.clazz, DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom) )); }
Example #26
Source File: SimpleTypeBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public TypeUse unionSimpleType(XSUnionSimpleType type) { boolean isCollection = false; for( int i=0; i<type.getMemberSize(); i++ ) if(type.getMember(i).getVariety()==XSVariety.LIST || type.getMember(i).getVariety()==XSVariety.UNION) { isCollection = true; break; } TypeUse r = CBuiltinLeafInfo.STRING; if(isCollection) r = TypeUseFactory.makeCollection(r); return r; }
Example #27
Source File: BIEnumeration.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** Creates a global enumeration declaration. */ static BIEnumeration create( Element dom, BindInfo parent ) { // create a class in the target package. return new BIEnumeration( dom, new CEnumLeafInfo( parent.model, null, new CClassInfoParent.Package(parent.getTargetPackage()), DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom))); }
Example #28
Source File: TypeUseBinder.java From hottub with GNU General Public License v2.0 | 5 votes |
private TypeUse onDataType(String datatypeLibrary, String type) { DatatypeLib lib = compiler.datatypes.get(datatypeLibrary); if(lib!=null) { TypeUse use = lib.get(type); if(use!=null) return use; } // unknown return CBuiltinLeafInfo.STRING; }
Example #29
Source File: BIEnumeration.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** Creates a global enumeration declaration. */ static BIEnumeration create( Element dom, BindInfo parent ) { // create a class in the target package. return new BIEnumeration( dom, new CEnumLeafInfo( parent.model, null, new CClassInfoParent.Package(parent.getTargetPackage()), DOMUtil.getAttribute(dom,"name"), CBuiltinLeafInfo.STRING, buildMemberList(parent.model,dom), null, null/*TODO*/, DOMLocator.getLocationInfo(dom))); }
Example #30
Source File: SimpleTypeBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public TypeUse unionSimpleType(XSUnionSimpleType type) { boolean isCollection = false; for( int i=0; i<type.getMemberSize(); i++ ) if(type.getMember(i).getVariety()==XSVariety.LIST || type.getMember(i).getVariety()==XSVariety.UNION) { isCollection = true; break; } TypeUse r = CBuiltinLeafInfo.STRING; if(isCollection) r = TypeUseFactory.makeCollection(r); return r; }