<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Beautiful Java: Reflection and the BeanCopier</title>
	<atom:link href="http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/</link>
	<description>Programming is hard</description>
	<pubDate>Sat, 22 Nov 2008 10:12:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-139917</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 29 Jul 2008 19:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-139917</guid>
		<description>Nice.</description>
		<content:encoded><![CDATA[<p>Nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: null</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-139809</link>
		<dc:creator>null</dc:creator>
		<pubDate>Tue, 29 Jul 2008 15:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-139809</guid>
		<description>http://dozer.sourceforge.net/</description>
		<content:encoded><![CDATA[<p><a href="http://dozer.sourceforge.net/" rel="nofollow">http://dozer.sourceforge.net/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How-to: copying an object with several ways &#171; When IE meets SE</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-48619</link>
		<dc:creator>How-to: copying an object with several ways &#171; When IE meets SE</dc:creator>
		<pubDate>Sat, 12 Jan 2008 07:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-48619</guid>
		<description>[...] How-to: copying an object with several&#160;ways   Published January 12, 2008   Java       You may have this situation, you need to copy an object for some purpose. So you know the copy constructor but do you know how may ways to implement it? After I read Beautiful Java: Reflection and the BeanCopier, I complied those methods. Also you need to think about Law of Distributed Object Design: Don’t distribute your objects! and don&#8217;t distribute it!! [...]</description>
		<content:encoded><![CDATA[<p>[...] How-to: copying an object with several&nbsp;ways   Published January 12, 2008   Java       You may have this situation, you need to copy an object for some purpose. So you know the copy constructor but do you know how may ways to implement it? After I read Beautiful Java: Reflection and the BeanCopier, I complied those methods. Also you need to think about Law of Distributed Object Design: Don’t distribute your objects! and don&#8217;t distribute it!! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40725</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 24 Nov 2007 11:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40725</guid>
		<description>I still don't think xstream is faster than copying properties, I can't see why it should.

And as I said, copying attributes to an object is something different than creating a copy of an object.

"There is another solution though - I think jboss have a similar object serialisation technology that would work similarly."

If you've read the post, I wrote "JBoss provides a fast implementation of this technique."

And yes, I have been using XStream in several projects.

And yes, I've said it is perhaps best to use Commons BeanUtils to copy properties.

:-)</description>
		<content:encoded><![CDATA[<p>I still don&#8217;t think xstream is faster than copying properties, I can&#8217;t see why it should.</p>
<p>And as I said, copying attributes to an object is something different than creating a copy of an object.</p>
<p>&#8220;There is another solution though - I think jboss have a similar object serialisation technology that would work similarly.&#8221;</p>
<p>If you&#8217;ve read the post, I wrote &#8220;JBoss provides a fast implementation of this technique.&#8221;</p>
<p>And yes, I have been using XStream in several projects.</p>
<p>And yes, I&#8217;ve said it is perhaps best to use Commons BeanUtils to copy properties.</p>
<p>:-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ben</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40710</link>
		<dc:creator>ben</dc:creator>
		<pubDate>Sat, 24 Nov 2007 09:11:43 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40710</guid>
		<description>XStream should be used by every java developer imho. It vastly simplifies copying of objects, serialisation, and is FASTER than normal serialisation without the drawbacks.

It could also be trivially enhanced to pass an object into it:

templateObject = new ...
xstream.fromXml(templateObject, xml);

xstream.codehaus.org

There are many, many problems with doing your own approach - god knows I have tried. Its a large can of worms, as I am sure the xstream guys know. 

There is another solution though - I think jboss have a similar object serialisation technology that would work similarly.

Lastly, if you want to restrict to beans, you can use the internal java classes xmlencoder,xmldecoder, but those are horrid imho.</description>
		<content:encoded><![CDATA[<p>XStream should be used by every java developer imho. It vastly simplifies copying of objects, serialisation, and is FASTER than normal serialisation without the drawbacks.</p>
<p>It could also be trivially enhanced to pass an object into it:</p>
<p>templateObject = new &#8230;<br />
xstream.fromXml(templateObject, xml);</p>
<p>xstream.codehaus.org</p>
<p>There are many, many problems with doing your own approach - god knows I have tried. Its a large can of worms, as I am sure the xstream guys know. </p>
<p>There is another solution though - I think jboss have a similar object serialisation technology that would work similarly.</p>
<p>Lastly, if you want to restrict to beans, you can use the internal java classes xmlencoder,xmldecoder, but those are horrid imho.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40706</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 24 Nov 2007 08:29:22 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40706</guid>
		<description>Nice solution. But I guess it's slower and more diffcult to understand for developers who don't know xstream. It's also more complex to configure. XStream is more robust though, you're right. And of course your solution doesn't copy properties but creates a new copy of an object. At least I would write a small wrapper with a &lt;code&gt;copy&lt;/code&gt; copy method to change the semantics.</description>
		<content:encoded><![CDATA[<p>Nice solution. But I guess it&#8217;s slower and more diffcult to understand for developers who don&#8217;t know xstream. It&#8217;s also more complex to configure. XStream is more robust though, you&#8217;re right. And of course your solution doesn&#8217;t copy properties but creates a new copy of an object. At least I would write a small wrapper with a <code>copy</code> copy method to change the semantics.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ben</title>
		<link>http://www.codemonkeyism.com/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40676</link>
		<dc:creator>ben</dc:creator>
		<pubDate>Sat, 24 Nov 2007 03:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/23/beautiful-java-reflection-and-the-beancopier/#comment-40676</guid>
		<description>copy = xstream.fromXML(xstream.toXml(object));

Easier, faster, more robust.</description>
		<content:encoded><![CDATA[<p>copy = xstream.fromXML(xstream.toXml(object));</p>
<p>Easier, faster, more robust.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
