com.sun.tools.internal.xjc.api.SpecVersion Java Examples
The following examples show how to use
com.sun.tools.internal.xjc.api.SpecVersion.
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: Options.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #2
Source File: WsimportOptions.java From hottub with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #3
Source File: WsimportOptions.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #4
Source File: Options.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #5
Source File: Options.java From hottub with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #6
Source File: WsimportOptions.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #7
Source File: Options.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #8
Source File: WsimportOptions.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #9
Source File: WsimportOptions.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #10
Source File: Options.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #11
Source File: Options.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #12
Source File: WsimportOptions.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #13
Source File: Options.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #14
Source File: WsimportOptions.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #15
Source File: WsimportOptions.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public SchemaCompiler getSchemaCompiler() { schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion())); if(entityResolver != null) { //set if its not null so as not to override catalog option specified via xjc args schemaCompiler.setEntityResolver(entityResolver); } return schemaCompiler; }
Example #16
Source File: Options.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public Options() { try { Class.forName("javax.xml.bind.JAXBPermission"); } catch (ClassNotFoundException cnfe) { target = SpecVersion.V2_1; } }
Example #17
Source File: SchemaCompilerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #18
Source File: BeanGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }
Example #19
Source File: BeanGenerator.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }
Example #20
Source File: SchemaCompilerImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #21
Source File: BeanGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }
Example #22
Source File: SchemaCompilerImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #23
Source File: BeanGenerator.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }
Example #24
Source File: SchemaCompilerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #25
Source File: SchemaCompilerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #26
Source File: BeanGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }
Example #27
Source File: SchemaCompilerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #28
Source File: BeanGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }
Example #29
Source File: SchemaCompilerImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void setTargetVersion(SpecVersion version) { if(version==null) version = SpecVersion.LATEST; opts.target = version; }
Example #30
Source File: BeanGenerator.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Generates the body of a class. * */ private void generateClassBody(ClassOutlineImpl cc) { CClassInfo target = cc.target; // used to simplify the generated annotations String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI(); // [RESULT] // @XmlType(name="foo", targetNamespace="bar://baz") XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class); writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI); if (model.options.target.isLaterThan(SpecVersion.V2_1)) { // @XmlSeeAlso Iterator<CClassInfo> subclasses = cc.target.listSubclasses(); if (subclasses.hasNext()) { XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class); while (subclasses.hasNext()) { CClassInfo s = subclasses.next(); saw.value(getClazz(s).implRef); } } } if (target.isElement()) { String namespaceURI = target.getElementName().getNamespaceURI(); String localPart = target.getElementName().getLocalPart(); // [RESULT] // @XmlRootElement(name="foo", targetNamespace="bar://baz") XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class); xrew.name(localPart); if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary { xrew.namespace(namespaceURI); } } if (target.isOrdered()) { for (CPropertyInfo p : target.getProperties()) { if (!(p instanceof CAttributePropertyInfo)) { if (!((p instanceof CReferencePropertyInfo) && ((CReferencePropertyInfo) p).isDummy())) { xtw.propOrder(p.getName(false)); } } } } else { // produce empty array xtw.getAnnotationUse().paramArray("propOrder"); } for (CPropertyInfo prop : target.getProperties()) { generateFieldDecl(cc, prop); } if (target.declaresAttributeWildcard()) { generateAttributeWildcard(cc); } // generate some class level javadoc cc.ref.javadoc().append(target.javadoc); cc._package().objectFactoryGenerator().populate(cc); }