You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Bjorn Thor Jonsson (JIRA)" <ji...@apache.org> on 2011/02/22 13:22:38 UTC
[jira] Created: (CXF-3354) XJC Cloneable plugin
XJC Cloneable plugin
--------------------
Key: CXF-3354
URL: https://issues.apache.org/jira/browse/CXF-3354
Project: CXF
Issue Type: New Feature
Components: Tooling
Affects Versions: 2.2.8
Reporter: Bjorn Thor Jonsson
Priority: Minor
Attached is an XJC plugin that adds {{implements Cloneable}} and a {{clone()}} method to all generated schema classes:
{code:title=FooSchema.java}
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
{code}
To use with CXF just pass in the {{-xjc-Xcloneable}} argument and make sure the attached JAR file is on classpath along with the dependency {{jaxb-xjc-2.1.12.jar}}.
Source is included in the JAR. Implemented for Siminn (http://www.siminn.is/ - http://siminn.com/) and contributed with permission.
Maybe something to include at http://cxf.apache.org/xjc-utils.html ?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-3354) XJC Cloneable plugin
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-3354.
------------------------------
Resolution: Won't Fix
Assignee: Daniel Kulp
I'm going to close this since the other solution mentioned in the comments is a better solution and no point in duplicating it.
> XJC Cloneable plugin
> --------------------
>
> Key: CXF-3354
> URL: https://issues.apache.org/jira/browse/CXF-3354
> Project: CXF
> Issue Type: New Feature
> Components: Tooling
> Affects Versions: 2.2.8
> Reporter: Bjorn Thor Jonsson
> Assignee: Daniel Kulp
> Priority: Minor
> Labels: cloneable, plugin
> Attachments: cxf-xjc-cloneable.jar
>
>
> Attached is an XJC plugin that adds {{implements Cloneable}} and a {{clone()}} method to all generated schema classes:
> {code:title=FooSchema.java}
> public Object clone() throws CloneNotSupportedException {
> return super.clone();
> }
> {code}
> To use with CXF just pass in the {{-xjc-Xcloneable}} argument and make sure the attached JAR file is on classpath along with the dependency {{jaxb-xjc-2.1.12.jar}}.
> Source is included in the JAR. Implemented for Siminn (http://www.siminn.is/ - http://siminn.com/) and contributed with permission.
> Maybe something to include at http://cxf.apache.org/xjc-utils.html ?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CXF-3354) XJC Cloneable plugin
Posted by "Bjorn Thor Jonsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998834#comment-12998834 ]
Bjorn Thor Jonsson commented on CXF-3354:
-----------------------------------------
After implementing this cxf-xjc-cloneable plugin I've found [CC-XJC|http://ccxjc.sourceforge.net/] which does a better job handling the standard Java Collections which don't implement Cloneable, so CC-XJC uses Cloneable where possible and then iterates over all Java Collections instances and appropriately calls `.clone()` on their elements.
If I've already found CC-XJC I wouldn't have implemented my own plugin but it was a fun exercise :)
> XJC Cloneable plugin
> --------------------
>
> Key: CXF-3354
> URL: https://issues.apache.org/jira/browse/CXF-3354
> Project: CXF
> Issue Type: New Feature
> Components: Tooling
> Affects Versions: 2.2.8
> Reporter: Bjorn Thor Jonsson
> Priority: Minor
> Labels: cloneable, plugin
> Attachments: cxf-xjc-cloneable.jar
>
>
> Attached is an XJC plugin that adds {{implements Cloneable}} and a {{clone()}} method to all generated schema classes:
> {code:title=FooSchema.java}
> public Object clone() throws CloneNotSupportedException {
> return super.clone();
> }
> {code}
> To use with CXF just pass in the {{-xjc-Xcloneable}} argument and make sure the attached JAR file is on classpath along with the dependency {{jaxb-xjc-2.1.12.jar}}.
> Source is included in the JAR. Implemented for Siminn (http://www.siminn.is/ - http://siminn.com/) and contributed with permission.
> Maybe something to include at http://cxf.apache.org/xjc-utils.html ?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (CXF-3354) XJC Cloneable plugin
Posted by "Bjorn Thor Jonsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bjorn Thor Jonsson updated CXF-3354:
------------------------------------
Attachment: cxf-xjc-cloneable.jar
> XJC Cloneable plugin
> --------------------
>
> Key: CXF-3354
> URL: https://issues.apache.org/jira/browse/CXF-3354
> Project: CXF
> Issue Type: New Feature
> Components: Tooling
> Affects Versions: 2.2.8
> Reporter: Bjorn Thor Jonsson
> Priority: Minor
> Labels: cloneable, plugin
> Attachments: cxf-xjc-cloneable.jar
>
>
> Attached is an XJC plugin that adds {{implements Cloneable}} and a {{clone()}} method to all generated schema classes:
> {code:title=FooSchema.java}
> public Object clone() throws CloneNotSupportedException {
> return super.clone();
> }
> {code}
> To use with CXF just pass in the {{-xjc-Xcloneable}} argument and make sure the attached JAR file is on classpath along with the dependency {{jaxb-xjc-2.1.12.jar}}.
> Source is included in the JAR. Implemented for Siminn (http://www.siminn.is/ - http://siminn.com/) and contributed with permission.
> Maybe something to include at http://cxf.apache.org/xjc-utils.html ?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (CXF-3354) XJC Cloneable plugin
Posted by "Bjorn Thor Jonsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998834#comment-12998834 ]
Bjorn Thor Jonsson edited comment on CXF-3354 at 2/24/11 3:03 PM:
------------------------------------------------------------------
After implementing this cxf-xjc-cloneable plugin I've found [CC-XJC|http://ccxjc.sourceforge.net/] which does a better job handling the standard Java Collections which don't implement Cloneable, so CC-XJC uses Cloneable where possible and then iterates over all Java Collections instances and appropriately calls {{.clone()}} on their elements.
If I'd already found CC-XJC I wouldn't have implemented my own plugin but it was a fun exercise :)
was (Author: bthj):
After implementing this cxf-xjc-cloneable plugin I've found [CC-XJC|http://ccxjc.sourceforge.net/] which does a better job handling the standard Java Collections which don't implement Cloneable, so CC-XJC uses Cloneable where possible and then iterates over all Java Collections instances and appropriately calls `.clone()` on their elements.
If I've already found CC-XJC I wouldn't have implemented my own plugin but it was a fun exercise :)
> XJC Cloneable plugin
> --------------------
>
> Key: CXF-3354
> URL: https://issues.apache.org/jira/browse/CXF-3354
> Project: CXF
> Issue Type: New Feature
> Components: Tooling
> Affects Versions: 2.2.8
> Reporter: Bjorn Thor Jonsson
> Priority: Minor
> Labels: cloneable, plugin
> Attachments: cxf-xjc-cloneable.jar
>
>
> Attached is an XJC plugin that adds {{implements Cloneable}} and a {{clone()}} method to all generated schema classes:
> {code:title=FooSchema.java}
> public Object clone() throws CloneNotSupportedException {
> return super.clone();
> }
> {code}
> To use with CXF just pass in the {{-xjc-Xcloneable}} argument and make sure the attached JAR file is on classpath along with the dependency {{jaxb-xjc-2.1.12.jar}}.
> Source is included in the JAR. Implemented for Siminn (http://www.siminn.is/ - http://siminn.com/) and contributed with permission.
> Maybe something to include at http://cxf.apache.org/xjc-utils.html ?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira