You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/02/21 21:34:01 UTC

svn commit: r1886771 [3/8] - in /xmlbeans/trunk: ./ src/main/java/org/apache/xmlbeans/ src/main/java/org/apache/xmlbeans/impl/schema/ src/main/java/org/apache/xmlbeans/impl/tool/ src/main/java/org/apache/xmlbeans/impl/values/ src/main/multimodule/java9...

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLanguage.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLanguage.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLanguage.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLanguage.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#language">xs:language</a> type.
@@ -24,138 +26,11 @@ package org.apache.xmlbeans;
  * Convertible to a Java {@link String}.
  */
 public interface XmlLanguage extends XmlToken {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_language");
+    XmlObjectFactory<XmlLanguage> Factory = new XmlObjectFactory<>("_BI_language");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlLanguage}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlLanguage}
-         */
-        public static XmlLanguage newInstance() {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlLanguage}
-         */
-        public static XmlLanguage newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlLanguage} value
-         */
-        public static XmlLanguage newValue(Object obj) {
-            return (XmlLanguage) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a String. For example: "<code>&lt;xml-fragment&gt;en-us&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlLanguage parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a String. For example: "<code>&lt;xml-fragment&gt;en-us&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlLanguage parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a File.
-         */
-        public static XmlLanguage parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a File.
-         */
-        public static XmlLanguage parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a URL.
-         */
-        public static XmlLanguage parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a URL.
-         */
-        public static XmlLanguage parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from an InputStream.
-         */
-        public static XmlLanguage parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from an InputStream.
-         */
-        public static XmlLanguage parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a Reader.
-         */
-        public static XmlLanguage parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a Reader.
-         */
-        public static XmlLanguage parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a DOM Node.
-         */
-        public static XmlLanguage parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from a DOM Node.
-         */
-        public static XmlLanguage parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from an XMLStreamReader.
-         */
-        public static XmlLanguage parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLanguage} fragment from an XMLStreamReader.
-         */
-        public static XmlLanguage parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlLanguage) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLong.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLong.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLong.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlLong.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#long">xs:long</a> type.
@@ -23,10 +25,12 @@ package org.apache.xmlbeans;
  * Naturally, convertible to a Java long.
  */
 public interface XmlLong extends XmlInteger {
+    XmlObjectFactory<XmlLong> Factory = new XmlObjectFactory<>("_BI_long");
+
     /**
      * The constant {@link SchemaType} object representing this schema type.
      */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_long");
+    SchemaType type = Factory.getType();
 
     /**
      * Returns this value as a long
@@ -37,134 +41,5 @@ public interface XmlLong extends XmlInte
      * Sets this value as a long
      */
     void setLongValue(long v);
-
-    /**
-     * A class with methods for creating instances
-     * of {@link XmlLong}.
-     */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlLong}
-         */
-        public static XmlLong newInstance() {
-            return (XmlLong) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlLong}
-         */
-        public static XmlLong newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlLong) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlLong} value
-         */
-        public static XmlLong newValue(Object obj) {
-            return (XmlLong) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a String. For example: "<code>&lt;xml-fragment&gt;123456789&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlLong parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a String. For example: "<code>&lt;xml-fragment&gt;123456789&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlLong parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a File.
-         */
-        public static XmlLong parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a File.
-         */
-        public static XmlLong parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a URL.
-         */
-        public static XmlLong parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a URL.
-         */
-        public static XmlLong parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from an InputStream.
-         */
-        public static XmlLong parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from an InputStream.
-         */
-        public static XmlLong parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a Reader.
-         */
-        public static XmlLong parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a Reader.
-         */
-        public static XmlLong parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a DOM Node.
-         */
-        public static XmlLong parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from a DOM Node.
-         */
-        public static XmlLong parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from an XMLStreamReader.
-         */
-        public static XmlLong parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlLong} fragment from an XMLStreamReader.
-         */
-        public static XmlLong parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlLong) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNCName.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNCName.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNCName.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNCName.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#Name">xs:Name</a> type.
@@ -28,138 +30,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link String}.
  */
 public interface XmlNCName extends XmlName {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_NCName");
+    XmlObjectFactory<XmlNCName> Factory = new XmlObjectFactory<>("_BI_NCName");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNCName}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNCName}
-         */
-        public static XmlNCName newInstance() {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNCName}
-         */
-        public static XmlNCName newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNCName} value
-         */
-        public static XmlNCName newValue(Object obj) {
-            return (XmlNCName) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a String. For example: "<code>&lt;xml-fragment&gt;My-Name&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNCName parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a String. For example: "<code>&lt;xml-fragment&gt;My-Name&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNCName parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a File.
-         */
-        public static XmlNCName parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a File.
-         */
-        public static XmlNCName parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a URL.
-         */
-        public static XmlNCName parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a URL.
-         */
-        public static XmlNCName parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from an InputStream.
-         */
-        public static XmlNCName parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from an InputStream.
-         */
-        public static XmlNCName parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a Reader.
-         */
-        public static XmlNCName parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a Reader.
-         */
-        public static XmlNCName parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a DOM Node.
-         */
-        public static XmlNCName parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from a DOM Node.
-         */
-        public static XmlNCName parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from an XMLStreamReader.
-         */
-        public static XmlNCName parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNCName} fragment from an XMLStreamReader.
-         */
-        public static XmlNCName parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNCName) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKEN.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKEN.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKEN.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKEN.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#NMTOKEN">xs:NMTOKEN</a> type.
@@ -27,138 +29,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link String}.
  */
 public interface XmlNMTOKEN extends XmlToken {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_NMTOKEN");
+    XmlObjectFactory<XmlNMTOKEN> Factory = new XmlObjectFactory<>("_BI_NMTOKEN");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNMTOKEN}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNMTOKEN}
-         */
-        public static XmlNMTOKEN newInstance() {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNMTOKEN}
-         */
-        public static XmlNMTOKEN newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNMTOKEN} value
-         */
-        public static XmlNMTOKEN newValue(Object obj) {
-            return (XmlNMTOKEN) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a String. For example: "<code>&lt;xml-fragment&gt;sample-1.2&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNMTOKEN parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a String. For example: "<code>&lt;xml-fragment&gt;sample-1.2&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNMTOKEN parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a File.
-         */
-        public static XmlNMTOKEN parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a File.
-         */
-        public static XmlNMTOKEN parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a URL.
-         */
-        public static XmlNMTOKEN parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a URL.
-         */
-        public static XmlNMTOKEN parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from an InputStream.
-         */
-        public static XmlNMTOKEN parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from an InputStream.
-         */
-        public static XmlNMTOKEN parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a Reader.
-         */
-        public static XmlNMTOKEN parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a Reader.
-         */
-        public static XmlNMTOKEN parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a DOM Node.
-         */
-        public static XmlNMTOKEN parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from a DOM Node.
-         */
-        public static XmlNMTOKEN parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from an XMLStreamReader.
-         */
-        public static XmlNMTOKEN parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKEN} fragment from an XMLStreamReader.
-         */
-        public static XmlNMTOKEN parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKEN) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKENS.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKENS.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKENS.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNMTOKENS.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 import java.util.List;
 
 
@@ -26,10 +28,12 @@ import java.util.List;
  * Convertible to {@link List}.
  */
 public interface XmlNMTOKENS extends XmlAnySimpleType {
+    XmlObjectFactory<XmlNMTOKENS> Factory = new XmlObjectFactory<>("_BI_NMTOKENS");
+
     /**
      * The constant {@link SchemaType} object representing this schema type.
      */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_NMTOKENS");
+    SchemaType type = Factory.getType();
 
     /**
      * Returns the value as a {@link List} of {@link String} values
@@ -45,134 +49,5 @@ public interface XmlNMTOKENS extends Xml
      * Sets the value as a {@link List}
      */
     void setListValue(List<?> l);
-
-    /**
-     * A class with methods for creating instances
-     * of {@link XmlNMTOKENS}.
-     */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNMTOKENS}
-         */
-        public static XmlNMTOKENS newInstance() {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNMTOKENS}
-         */
-        public static XmlNMTOKENS newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNMTOKENS} value
-         */
-        public static XmlNMTOKENS newValue(Object obj) {
-            return (XmlNMTOKENS) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a String. For example: "<code>&lt;xml-fragment&gt;sample-1.1 sample-1.2 sample-1.3&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNMTOKENS parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a String. For example: "<code>&lt;xml-fragment&gt;sample-1.1 sample-1.2 sample-1.3&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNMTOKENS parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a File.
-         */
-        public static XmlNMTOKENS parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a File.
-         */
-        public static XmlNMTOKENS parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a URL.
-         */
-        public static XmlNMTOKENS parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a URL.
-         */
-        public static XmlNMTOKENS parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from an InputStream.
-         */
-        public static XmlNMTOKENS parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from an InputStream.
-         */
-        public static XmlNMTOKENS parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a Reader.
-         */
-        public static XmlNMTOKENS parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a Reader.
-         */
-        public static XmlNMTOKENS parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a DOM Node.
-         */
-        public static XmlNMTOKENS parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from a DOM Node.
-         */
-        public static XmlNMTOKENS parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from an XMLStreamReader.
-         */
-        public static XmlNMTOKENS parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNMTOKENS} fragment from an XMLStreamReader.
-         */
-        public static XmlNMTOKENS parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNMTOKENS) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNOTATION.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNOTATION.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNOTATION.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNOTATION.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#NOTATION">xs:NOTATION</a> type.
@@ -26,138 +28,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link String}.
  */
 public interface XmlNOTATION extends XmlAnySimpleType {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_NOTATION");
+    XmlObjectFactory<XmlNOTATION> Factory = new XmlObjectFactory<>("_BI_NOTATION");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNOTATION}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNOTATION}
-         */
-        public static XmlNOTATION newInstance() {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNOTATION}
-         */
-        public static XmlNOTATION newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNOTATION} value
-         */
-        public static XmlNOTATION newValue(Object obj) {
-            return (XmlNOTATION) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a String.
-         */
-        public static XmlNOTATION parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a String.
-         */
-        public static XmlNOTATION parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a File.
-         */
-        public static XmlNOTATION parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a File.
-         */
-        public static XmlNOTATION parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a URL.
-         */
-        public static XmlNOTATION parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a URL.
-         */
-        public static XmlNOTATION parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from an InputStream.
-         */
-        public static XmlNOTATION parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from an InputStream.
-         */
-        public static XmlNOTATION parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a Reader.
-         */
-        public static XmlNOTATION parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a Reader.
-         */
-        public static XmlNOTATION parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a DOM Node.
-         */
-        public static XmlNOTATION parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from a DOM Node.
-         */
-        public static XmlNOTATION parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from an XMLStreamReader.
-         */
-        public static XmlNOTATION parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNOTATION} fragment from an XMLStreamReader.
-         */
-        public static XmlNOTATION parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNOTATION) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlName.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlName.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlName.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlName.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#Name">xs:Name</a> type.
@@ -28,138 +30,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link String}.
  */
 public interface XmlName extends XmlToken {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_Name");
+    XmlObjectFactory<XmlName> Factory = new XmlObjectFactory<>("_BI_Name");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlName}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlName}
-         */
-        public static XmlName newInstance() {
-            return (XmlName) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlName}
-         */
-        public static XmlName newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlName) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlName} value
-         */
-        public static XmlName newValue(Object obj) {
-            return (XmlName) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a String. For example: "<code>&lt;xml-fragment&gt;My:Name&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlName parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a String. For example: "<code>&lt;xml-fragment&gt;My:Name&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlName parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a File.
-         */
-        public static XmlName parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a File.
-         */
-        public static XmlName parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a URL.
-         */
-        public static XmlName parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a URL.
-         */
-        public static XmlName parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from an InputStream.
-         */
-        public static XmlName parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from an InputStream.
-         */
-        public static XmlName parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a Reader.
-         */
-        public static XmlName parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a Reader.
-         */
-        public static XmlName parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a DOM Node.
-         */
-        public static XmlName parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from a DOM Node.
-         */
-        public static XmlName parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from an XMLStreamReader.
-         */
-        public static XmlName parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlName} fragment from an XMLStreamReader.
-         */
-        public static XmlName parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlName) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNegativeInteger.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNegativeInteger.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNegativeInteger.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNegativeInteger.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#negativeInteger">xs:negativeInteger</a> type.
@@ -25,138 +27,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link java.math.BigInteger}.
  */
 public interface XmlNegativeInteger extends XmlNonPositiveInteger {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_negativeInteger");
+    XmlObjectFactory<XmlNegativeInteger> Factory = new XmlObjectFactory<>("_BI_negativeInteger");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNegativeInteger}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNegativeInteger}
-         */
-        public static XmlNegativeInteger newInstance() {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNegativeInteger}
-         */
-        public static XmlNegativeInteger newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNegativeInteger} value
-         */
-        public static XmlNegativeInteger newValue(Object obj) {
-            return (XmlNegativeInteger) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a String. For example: "<code>&lt;xml-fragment&gt;-1234567890&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNegativeInteger parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a String. For example: "<code>&lt;xml-fragment&gt;-1234567890&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNegativeInteger parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a File.
-         */
-        public static XmlNegativeInteger parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a File.
-         */
-        public static XmlNegativeInteger parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a URL.
-         */
-        public static XmlNegativeInteger parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a URL.
-         */
-        public static XmlNegativeInteger parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from an InputStream.
-         */
-        public static XmlNegativeInteger parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from an InputStream.
-         */
-        public static XmlNegativeInteger parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a Reader.
-         */
-        public static XmlNegativeInteger parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a Reader.
-         */
-        public static XmlNegativeInteger parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a DOM Node.
-         */
-        public static XmlNegativeInteger parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from a DOM Node.
-         */
-        public static XmlNegativeInteger parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from an XMLStreamReader.
-         */
-        public static XmlNegativeInteger parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNegativeInteger} fragment from an XMLStreamReader.
-         */
-        public static XmlNegativeInteger parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNegativeInteger) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonNegativeInteger.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonNegativeInteger.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonNegativeInteger.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonNegativeInteger.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger">xs:nonNegativeInteger</a> type.
@@ -25,138 +27,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link java.math.BigInteger}.
  */
 public interface XmlNonNegativeInteger extends XmlInteger {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_nonNegativeInteger");
+    XmlObjectFactory<XmlNonNegativeInteger> Factory = new XmlObjectFactory<>("_BI_nonNegativeInteger");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNonNegativeInteger}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNonNegativeInteger}
-         */
-        public static XmlNonNegativeInteger newInstance() {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNonNegativeInteger}
-         */
-        public static XmlNonNegativeInteger newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNonNegativeInteger} value
-         */
-        public static XmlNonNegativeInteger newValue(Object obj) {
-            return (XmlNonNegativeInteger) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a String. For example: "<code>&lt;xml-fragment&gt;1234567890&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNonNegativeInteger parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a String. For example: "<code>&lt;xml-fragment&gt;1234567890&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNonNegativeInteger parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a File.
-         */
-        public static XmlNonNegativeInteger parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a File.
-         */
-        public static XmlNonNegativeInteger parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a URL.
-         */
-        public static XmlNonNegativeInteger parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a URL.
-         */
-        public static XmlNonNegativeInteger parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from an InputStream.
-         */
-        public static XmlNonNegativeInteger parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from an InputStream.
-         */
-        public static XmlNonNegativeInteger parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a Reader.
-         */
-        public static XmlNonNegativeInteger parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a Reader.
-         */
-        public static XmlNonNegativeInteger parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a DOM Node.
-         */
-        public static XmlNonNegativeInteger parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from a DOM Node.
-         */
-        public static XmlNonNegativeInteger parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from an XMLStreamReader.
-         */
-        public static XmlNonNegativeInteger parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonNegativeInteger} fragment from an XMLStreamReader.
-         */
-        public static XmlNonNegativeInteger parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonNegativeInteger) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonPositiveInteger.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonPositiveInteger.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonPositiveInteger.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNonPositiveInteger.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger">xs:nonPositiveInteger</a> type.
@@ -25,138 +27,11 @@ package org.apache.xmlbeans;
  * Convertible to {@link java.math.BigInteger}.
  */
 public interface XmlNonPositiveInteger extends XmlInteger {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_nonPositiveInteger");
+    XmlObjectFactory<XmlNonPositiveInteger> Factory = new XmlObjectFactory<>("_BI_nonPositiveInteger");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNonPositiveInteger}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNonPositiveInteger}
-         */
-        public static XmlNonPositiveInteger newInstance() {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNonPositiveInteger}
-         */
-        public static XmlNonPositiveInteger newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNonPositiveInteger} value
-         */
-        public static XmlNonPositiveInteger newValue(Object obj) {
-            return (XmlNonPositiveInteger) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a String. For example: "<code>&lt;xml-fragment&gt;-1234567890&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNonPositiveInteger parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a String. For example: "<code>&lt;xml-fragment&gt;-1234567890&lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNonPositiveInteger parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a File.
-         */
-        public static XmlNonPositiveInteger parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a File.
-         */
-        public static XmlNonPositiveInteger parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a URL.
-         */
-        public static XmlNonPositiveInteger parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a URL.
-         */
-        public static XmlNonPositiveInteger parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from an InputStream.
-         */
-        public static XmlNonPositiveInteger parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from an InputStream.
-         */
-        public static XmlNonPositiveInteger parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a Reader.
-         */
-        public static XmlNonPositiveInteger parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a Reader.
-         */
-        public static XmlNonPositiveInteger parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a DOM Node.
-         */
-        public static XmlNonPositiveInteger parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from a DOM Node.
-         */
-        public static XmlNonPositiveInteger parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from an XMLStreamReader.
-         */
-        public static XmlNonPositiveInteger parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNonPositiveInteger} fragment from an  XMLStreamReader.
-         */
-        public static XmlNonPositiveInteger parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNonPositiveInteger) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNormalizedString.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNormalizedString.java?rev=1886771&r1=1886770&r2=1886771&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNormalizedString.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/XmlNormalizedString.java Sun Feb 21 21:34:00 2021
@@ -15,6 +15,8 @@
 
 package org.apache.xmlbeans;
 
+import org.apache.xmlbeans.impl.schema.XmlObjectFactory;
+
 /**
  * Corresponds to the XML Schema
  * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#normalizedString">xs:normalizedString</a> type.
@@ -32,138 +34,11 @@ package org.apache.xmlbeans;
  * whitespace-normalized value is returned.
  */
 public interface XmlNormalizedString extends XmlString {
-    /**
-     * The constant {@link SchemaType} object representing this schema type.
-     */
-    SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_normalizedString");
+    XmlObjectFactory<XmlNormalizedString> Factory = new XmlObjectFactory<>("_BI_normalizedString");
 
     /**
-     * A class with methods for creating instances
-     * of {@link XmlNormalizedString}.
+     * The constant {@link SchemaType} object representing this schema type.
      */
-    final class Factory {
-        /**
-         * Creates an empty instance of {@link XmlNormalizedString}
-         */
-        public static XmlNormalizedString newInstance() {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().newInstance(type, null);
-        }
-
-        /**
-         * Creates an empty instance of {@link XmlNormalizedString}
-         */
-        public static XmlNormalizedString newInstance(org.apache.xmlbeans.XmlOptions options) {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().newInstance(type, options);
-        }
-
-        /**
-         * Creates an immutable {@link XmlNormalizedString} value
-         */
-        public static XmlNormalizedString newValue(Object obj) {
-            return (XmlNormalizedString) type.newValue(obj);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a String. For example: "<code>&lt;xml-fragment&gt; string to normalize &lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNormalizedString parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(s, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a String. For example: "<code>&lt;xml-fragment&gt; string to normalize &lt;/xml-fragment&gt;</code>".
-         */
-        public static XmlNormalizedString parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(s, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a File.
-         */
-        public static XmlNormalizedString parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(f, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a File.
-         */
-        public static XmlNormalizedString parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(f, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a URL.
-         */
-        public static XmlNormalizedString parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(u, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a URL.
-         */
-        public static XmlNormalizedString parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(u, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from an InputStream.
-         */
-        public static XmlNormalizedString parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(is, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from an InputStream.
-         */
-        public static XmlNormalizedString parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(is, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a Reader.
-         */
-        public static XmlNormalizedString parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(r, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a Reader.
-         */
-        public static XmlNormalizedString parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(r, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a DOM Node.
-         */
-        public static XmlNormalizedString parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(node, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from a DOM Node.
-         */
-        public static XmlNormalizedString parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(node, type, options);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from an XMLStreamReader.
-         */
-        public static XmlNormalizedString parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(xsr, type, null);
-        }
-
-        /**
-         * Parses a {@link XmlNormalizedString} fragment from an XMLStreamReader.
-         */
-        public static XmlNormalizedString parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
-            return (XmlNormalizedString) XmlBeans.getContextTypeLoader().parse(xsr, type, options);
-        }
-
-        private Factory() {
-            // No instance of this class allowed
-        }
-    }
+    SchemaType type = Factory.getType();
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org