Skip to content

Commit

Permalink
Integrated JAXB v4.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmak committed Jan 22, 2023
1 parent 5617b84 commit 63d7573
Show file tree
Hide file tree
Showing 79 changed files with 1,314 additions and 1,133 deletions.
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
</licenses>

<properties>
<jaxb-api.version>3.0.1</jaxb-api.version>
<jaxb-core.version>3.0.1</jaxb-core.version>
<jaxb-api.version>4.0.0</jaxb-api.version>
<jaxb-core.version>4.0.1</jaxb-core.version>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down Expand Up @@ -141,6 +141,12 @@
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<!-- Remove this dependency management after https://github.com/highsource/jaxb2-basics/pull/119 is resolved -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/sun/tools/xjc/addon/xew/CommonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ public static void addAnnotation(JVar field, JAnnotationUse annotation) {
}

/**
* Check that given field property has name customization ({@code <jaxb:property name="..." />}). See also
* {@code org.glassfish.jaxb.core.api.impl.NameUtil}.
* Check that given field property has name customization ({@code <jaxb:property name="..." />}).
*
* @see org.glassfish.jaxb.core.api.impl.NameUtil
* @see com.sun.codemodel.JJavaName
* @see com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty#getCustomization(XSComponent)
*/
Expand Down
22 changes: 11 additions & 11 deletions src/test/generated_resources/annotation_reference/ClassCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="class-common"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}byte"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
* <pre>{@code
* <complexType name="class-common">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}byte"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
Expand Down
24 changes: 12 additions & 12 deletions src/test/generated_resources/annotation_reference/ClassExt.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="class-ext"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{}class-common"&gt;
* &lt;sequence&gt;
* &lt;element name="country" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="code" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
* <pre>{@code
* <complexType name="class-ext">
* <complexContent>
* <extension base="{}class-common">
* <sequence>
* <element name="country" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="code" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
Expand Down
28 changes: 15 additions & 13 deletions src/test/generated_resources/annotation_reference/ClassesEu.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="classes-eu"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="class-eu" type="{}class-common" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
* <pre>{@code
* <complexType name="classes-eu">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="class-eu" type="{}class-common" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
Expand All @@ -44,7 +44,7 @@ public class ClassesEu {
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a <CODE>set</CODE> method for the classEu property.
* This is why there is not a {@code set} method for the classEu property.
*
* <p>
* For example, to add a new item, do as follows:
Expand All @@ -58,10 +58,12 @@ public class ClassesEu {
* {@link ClassCommon }
*
*
* @return
* The value of the classEu property.
*/
public List<ClassCommon> getClassEu() {
if (classEu == null) {
classEu = new ArrayList<ClassCommon>();
classEu = new ArrayList<>();
}
return this.classEu;
}
Expand Down
28 changes: 15 additions & 13 deletions src/test/generated_resources/annotation_reference/ClassesUs.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="classes-us"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="class-us" type="{}class-ext" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
* <pre>{@code
* <complexType name="classes-us">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="class-us" type="{}class-ext" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
Expand All @@ -44,7 +44,7 @@ public class ClassesUs {
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a <CODE>set</CODE> method for the classUs property.
* This is why there is not a {@code set} method for the classUs property.
*
* <p>
* For example, to add a new item, do as follows:
Expand All @@ -58,10 +58,12 @@ public class ClassesUs {
* {@link ClassExt }
*
*
* @return
* The value of the classUs property.
*/
public List<ClassExt> getClassUs() {
if (classUs == null) {
classUs = new ArrayList<ClassExt>();
classUs = new ArrayList<>();
}
return this.classUs;
}
Expand Down
32 changes: 17 additions & 15 deletions src/test/generated_resources/annotation_reference/Markup.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="markup"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;choice maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;element ref="{}br"/&gt;
* &lt;element ref="{}page"/&gt;
* &lt;element ref="{}para"/&gt;
* &lt;/choice&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
* <pre>{@code
* <complexType name="markup">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice maxOccurs="unbounded" minOccurs="0">
* <element ref="{}br"/>
* <element ref="{}page"/>
* <element ref="{}para"/>
* </choice>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
Expand All @@ -52,7 +52,7 @@ public class Markup {
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a <CODE>set</CODE> method for the brOrPageOrPara property.
* This is why there is not a {@code set} method for the brOrPageOrPara property.
*
* <p>
* For example, to add a new item, do as follows:
Expand All @@ -68,10 +68,12 @@ public class Markup {
* {@link JAXBElement }{@code <}{@link Object }{@code >}
*
*
* @return
* The value of the brOrPageOrPara property.
*/
public List<Object> getBrOrPageOrPara() {
if (brOrPageOrPara == null) {
brOrPageOrPara = new ArrayList<Object>();
brOrPageOrPara = new ArrayList<>();
}
return this.brOrPageOrPara;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public ObjectFactory() {
/**
* Create an instance of {@link Para }
*
* @return
* the new instance of {@link Para }
*/
public Para createPara() {
return new Para();
Expand All @@ -45,6 +47,8 @@ public Para createPara() {
/**
* Create an instance of {@link Markup }
*
* @return
* the new instance of {@link Markup }
*/
public Markup createMarkup() {
return new Markup();
Expand All @@ -53,6 +57,8 @@ public Markup createMarkup() {
/**
* Create an instance of {@link SearchEu }
*
* @return
* the new instance of {@link SearchEu }
*/
public SearchEu createSearchEu() {
return new SearchEu();
Expand All @@ -61,6 +67,8 @@ public SearchEu createSearchEu() {
/**
* Create an instance of {@link SearchMulti }
*
* @return
* the new instance of {@link SearchMulti }
*/
public SearchMulti createSearchMulti() {
return new SearchMulti();
Expand All @@ -69,6 +77,8 @@ public SearchMulti createSearchMulti() {
/**
* Create an instance of {@link ClassCommon }
*
* @return
* the new instance of {@link ClassCommon }
*/
public ClassCommon createClassCommon() {
return new ClassCommon();
Expand All @@ -77,6 +87,8 @@ public ClassCommon createClassCommon() {
/**
* Create an instance of {@link ClassExt }
*
* @return
* the new instance of {@link ClassExt }
*/
public ClassExt createClassExt() {
return new ClassExt();
Expand All @@ -85,6 +97,8 @@ public ClassExt createClassExt() {
/**
* Create an instance of {@link ClassesEu }
*
* @return
* the new instance of {@link ClassesEu }
*/
public ClassesEu createClassesEu() {
return new ClassesEu();
Expand All @@ -93,6 +107,8 @@ public ClassesEu createClassesEu() {
/**
* Create an instance of {@link ClassesUs }
*
* @return
* the new instance of {@link ClassesUs }
*/
public ClassesUs createClassesUs() {
return new ClassesUs();
Expand All @@ -108,7 +124,7 @@ public ClassesUs createClassesUs() {
*/
@XmlElementDecl(namespace = "", name = "br")
public JAXBElement<Object> createBr(Object value) {
return new JAXBElement<Object>(_Br_QNAME, Object.class, null, value);
return new JAXBElement<>(_Br_QNAME, Object.class, null, value);
}

/**
Expand All @@ -121,7 +137,7 @@ public JAXBElement<Object> createBr(Object value) {
*/
@XmlElementDecl(namespace = "", name = "page")
public JAXBElement<Object> createPage(Object value) {
return new JAXBElement<Object>(_Page_QNAME, Object.class, null, value);
return new JAXBElement<>(_Page_QNAME, Object.class, null, value);
}

}
28 changes: 15 additions & 13 deletions src/test/generated_resources/annotation_reference/Para.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="sub" type="{}markup" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
* <pre>{@code
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="sub" type="{}markup" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
Expand All @@ -46,7 +46,7 @@ public class Para {
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a <CODE>set</CODE> method for the sub property.
* This is why there is not a {@code set} method for the sub property.
*
* <p>
* For example, to add a new item, do as follows:
Expand All @@ -60,10 +60,12 @@ public class Para {
* {@link Markup }
*
*
* @return
* The value of the sub property.
*/
public List<Markup> getSub() {
if (sub == null) {
sub = new ArrayList<Markup>();
sub = new ArrayList<>();
}
return this.sub;
}
Expand Down
Loading

0 comments on commit 63d7573

Please sign in to comment.