|
List Info
Thread: Created: (XMLBEANS-289) At a Enumtype it would be fine it provides a values array
|
|
| Created: (XMLBEANS-289) At a Enumtype it
would be fine it provides a values array |

|
2006-09-20 18:12:24 |
At a Enumtype it would be fine it provides a values array
---------------------------------------------------------
Key: XMLBEANS-289
URL: htt
p://issues.apache.org/jira/browse/XMLBEANS-289
Project: XMLBeans
Issue Type: Improvement
Components: Compiler
Affects Versions: unspecified
Reporter: mirko quarg
Fix For: unspecified
i did a change the diff as follows
Index:
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
============================================================
=======
---
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (revision
448257)
+++
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (working
copy)
 -15,32
+15,29 
package org.apache.xmlbeans.impl.schema;
+import java.io.IOException;
import java.io.Writer;
-import java.io.IOException;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Map;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Iterator;
+import java.util.Map;
import javax.xml.namespace.QName;
-import org.apache.xmlbeans.impl.common.NameUtil;
+
+import org.apache.xmlbeans.InterfaceExtension;
import org.apache.xmlbeans.PrePostExtension;
-import org.apache.xmlbeans.InterfaceExtension;
+import org.apache.xmlbeans.SchemaCodePrinter;
+import org.apache.xmlbeans.SchemaProperty;
+import org.apache.xmlbeans.SchemaStringEnumEntry;
import org.apache.xmlbeans.SchemaType;
import org.apache.xmlbeans.SchemaTypeSystem;
-import org.apache.xmlbeans.SchemaProperty;
-import org.apache.xmlbeans.SchemaStringEnumEntry;
import org.apache.xmlbeans.SystemProperties;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
-import org.apache.xmlbeans.SchemaCodePrinter;
+import org.apache.xmlbeans.impl.common.NameUtil;
/**
* Prints the java code for a single schema type
 -929,16
+926,19 
emit("new Enum[]");
emit("{");
indent();
+ StringBuffer _buff = new StringBuffer();
for (int i = 0; i < entries.length; i++)
{
String enumValue = entries[i].getString();
String constName = "INT_" +
entries[i].getEnumName();
emit("new Enum(\"" +
javaStringEscape(enumValue) + "\", " +
constName + "),");
+
_buff.append(enumValue).append("\",\"&q
uot;);
}
outdent();
emit("}");
outdent();
emit(");");
+ emit("public static final String[] VALUES
= new String[] {\"" +
_buff.toString().substring(0,_buff.length()-2) +
"};");
emit("private static final long
serialVersionUID = 1L;");
emit("private java.lang.Object
readResolve() { return forInt(intValue()); } ");
outdent();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe xmlbeans.apache.org
For additional commands, e-mail: dev-help xmlbeans.apache.org
|
|
| Updated: (XMLBEANS-289) At a Enumtype it
would be fine it provides a values array |

|
2006-09-20 18:12:38 |
[ http://issues.apache.org/jira/browse/XMLBEANS-289?page
=all ]
mirko quarg updated XMLBEANS-289:
---------------------------------
Priority: Trivial (was: Major)
> At a Enumtype it would be fine it provides a values
array
>
---------------------------------------------------------
>
> Key: XMLBEANS-289
> URL: htt
p://issues.apache.org/jira/browse/XMLBEANS-289
> Project: XMLBeans
> Issue Type: Improvement
> Components: Compiler
> Affects Versions: unspecified
> Reporter: mirko quarg
> Priority: Trivial
> Fix For: unspecified
>
>
> i did a change the diff as follows
> Index:
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
>
============================================================
=======
> ---
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (revision
448257)
> +++
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (working
copy)
>  -15,32 +15,29 
>
> package org.apache.xmlbeans.impl.schema;
>
> +import java.io.IOException;
> import java.io.Writer;
> -import java.io.IOException;
> import java.nio.charset.CharacterCodingException;
> import java.nio.charset.Charset;
> import java.nio.charset.CharsetEncoder;
> -import java.util.ArrayList;
> -import java.util.Arrays;
> -import java.util.Map;
> import java.util.HashMap;
> import java.util.HashSet;
> import java.util.LinkedHashMap;
> -import java.util.List;
> -import java.util.Iterator;
> +import java.util.Map;
>
> import javax.xml.namespace.QName;
> -import org.apache.xmlbeans.impl.common.NameUtil;
> +
> +import org.apache.xmlbeans.InterfaceExtension;
> import org.apache.xmlbeans.PrePostExtension;
> -import org.apache.xmlbeans.InterfaceExtension;
> +import org.apache.xmlbeans.SchemaCodePrinter;
> +import org.apache.xmlbeans.SchemaProperty;
> +import org.apache.xmlbeans.SchemaStringEnumEntry;
> import org.apache.xmlbeans.SchemaType;
> import org.apache.xmlbeans.SchemaTypeSystem;
> -import org.apache.xmlbeans.SchemaProperty;
> -import org.apache.xmlbeans.SchemaStringEnumEntry;
> import org.apache.xmlbeans.SystemProperties;
> import org.apache.xmlbeans.XmlObject;
> import org.apache.xmlbeans.XmlOptions;
> -import org.apache.xmlbeans.SchemaCodePrinter;
> +import org.apache.xmlbeans.impl.common.NameUtil;
>
> /**
> * Prints the java code for a single schema type
>  -929,16 +926,19 
> emit("new Enum[]");
> emit("{");
> indent();
> + StringBuffer _buff = new StringBuffer();
> for (int i = 0; i < entries.length;
i++)
> {
> String enumValue =
entries[i].getString();
> String constName = "INT_"
+ entries[i].getEnumName();
> emit("new Enum(\""
+ javaStringEscape(enumValue) + "\", " +
constName + "),");
> +
_buff.append(enumValue).append("\",\"&q
uot;);
> }
> outdent();
> emit("}");
> outdent();
> emit(");");
> + emit("public static final String[]
VALUES = new String[] {\"" +
_buff.toString().substring(0,_buff.length()-2) +
"};");
> emit("private static final long
serialVersionUID = 1L;");
> emit("private java.lang.Object
readResolve() { return forInt(intValue()); } ");
> outdent();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe xmlbeans.apache.org
For additional commands, e-mail: dev-help xmlbeans.apache.org
|
|
| Updated: (XMLBEANS-289) At a Enumtype it
would be fine it provides a values array |

|
2006-09-20 18:14:35 |
[ http://issues.apache.org/jira/browse/XMLBEANS-289?page
=all ]
mirko quarg updated XMLBEANS-289:
---------------------------------
Attachment: patch.txt
> At a Enumtype it would be fine it provides a values
array
>
---------------------------------------------------------
>
> Key: XMLBEANS-289
> URL: htt
p://issues.apache.org/jira/browse/XMLBEANS-289
> Project: XMLBeans
> Issue Type: Improvement
> Components: Compiler
> Affects Versions: unspecified
> Reporter: mirko quarg
> Priority: Trivial
> Fix For: unspecified
>
> Attachments: patch.txt
>
>
> i did a change the diff as follows
> Index:
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
>
============================================================
=======
> ---
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (revision
448257)
> +++
D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apac
he/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (working
copy)
>  -15,32 +15,29 
>
> package org.apache.xmlbeans.impl.schema;
>
> +import java.io.IOException;
> import java.io.Writer;
> -import java.io.IOException;
> import java.nio.charset.CharacterCodingException;
> import java.nio.charset.Charset;
> import java.nio.charset.CharsetEncoder;
> -import java.util.ArrayList;
> -import java.util.Arrays;
> -import java.util.Map;
> import java.util.HashMap;
> import java.util.HashSet;
> import java.util.LinkedHashMap;
> -import java.util.List;
> -import java.util.Iterator;
> +import java.util.Map;
>
> import javax.xml.namespace.QName;
> -import org.apache.xmlbeans.impl.common.NameUtil;
> +
> +import org.apache.xmlbeans.InterfaceExtension;
> import org.apache.xmlbeans.PrePostExtension;
> -import org.apache.xmlbeans.InterfaceExtension;
> +import org.apache.xmlbeans.SchemaCodePrinter;
> +import org.apache.xmlbeans.SchemaProperty;
> +import org.apache.xmlbeans.SchemaStringEnumEntry;
> import org.apache.xmlbeans.SchemaType;
> import org.apache.xmlbeans.SchemaTypeSystem;
> -import org.apache.xmlbeans.SchemaProperty;
> -import org.apache.xmlbeans.SchemaStringEnumEntry;
> import org.apache.xmlbeans.SystemProperties;
> import org.apache.xmlbeans.XmlObject;
> import org.apache.xmlbeans.XmlOptions;
> -import org.apache.xmlbeans.SchemaCodePrinter;
> +import org.apache.xmlbeans.impl.common.NameUtil;
>
> /**
> * Prints the java code for a single schema type
>  -929,16 +926,19 
> emit("new Enum[]");
> emit("{");
> indent();
> + StringBuffer _buff = new StringBuffer();
> for (int i = 0; i < entries.length;
i++)
> {
> String enumValue =
entries[i].getString();
> String constName = "INT_"
+ entries[i].getEnumName();
> emit("new Enum(\""
+ javaStringEscape(enumValue) + "\", " +
constName + "),");
> +
_buff.append(enumValue).append("\",\"&q
uot;);
> }
> outdent();
> emit("}");
> outdent();
> emit(");");
> + emit("public static final String[]
VALUES = new String[] {\"" +
_buff.toString().substring(0,_buff.length()-2) +
"};");
> emit("private static final long
serialVersionUID = 1L;");
> emit("private java.lang.Object
readResolve() { return forInt(intValue()); } ");
> outdent();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe xmlbeans.apache.org
For additional commands, e-mail: dev-help xmlbeans.apache.org
|
|
[1-3]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|