<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Simplifying inheritance hierarchies using powertypes and Java 5 enums</title>
	<atom:link href="http://danhaywood.com/2010/03/06/simplifying-inheritance-hierarchies-using-powertypes-and-java-5-enums/feed/" rel="self" type="application/rss+xml" />
	<link>http://danhaywood.com/2010/03/06/simplifying-inheritance-hierarchies-using-powertypes-and-java-5-enums/</link>
	<description>domain driven design, restful objects, apache isis, the naked objects pattern, agile and more</description>
	<lastBuildDate>Thu, 17 May 2012 16:05:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: danhaywood</title>
		<link>http://danhaywood.com/2010/03/06/simplifying-inheritance-hierarchies-using-powertypes-and-java-5-enums/#comment-125</link>
		<dc:creator><![CDATA[danhaywood]]></dc:creator>
		<pubDate>Thu, 08 Apr 2010 20:28:27 +0000</pubDate>
		<guid isPermaLink="false">http://danhaywood.com/?p=540#comment-125</guid>
		<description><![CDATA[Hi Mohamed,

When you say one more type, I guess you mean one more instance of the enum (eg StockType#DVD).  In that case, though, I don&#039;t think this is the technique for you.  The point of an enum, of course, is that all known values are &lt;i&gt;enumerated&lt;/i&gt;.  If you wanted to support additional instances, then you&#039;d need to open up the code somehow.  In DDD terms, it&#039;d probably become an entity.

On the other hand, perhaps you aren&#039;t interested in adding new instances, but want somehow to change the behaviour associated with the instance.  In which case, check out the next post in the series.

Cheers
Dan]]></description>
		<content:encoded><![CDATA[<p>Hi Mohamed,</p>
<p>When you say one more type, I guess you mean one more instance of the enum (eg StockType#DVD).  In that case, though, I don&#8217;t think this is the technique for you.  The point of an enum, of course, is that all known values are <i>enumerated</i>.  If you wanted to support additional instances, then you&#8217;d need to open up the code somehow.  In DDD terms, it&#8217;d probably become an entity.</p>
<p>On the other hand, perhaps you aren&#8217;t interested in adding new instances, but want somehow to change the behaviour associated with the instance.  In which case, check out the next post in the series.</p>
<p>Cheers<br />
Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohamed El-Beltagy</title>
		<link>http://danhaywood.com/2010/03/06/simplifying-inheritance-hierarchies-using-powertypes-and-java-5-enums/#comment-124</link>
		<dc:creator><![CDATA[Mohamed El-Beltagy]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 13:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://danhaywood.com/?p=540#comment-124</guid>
		<description><![CDATA[First of all, I am very sorry for commenting although I know nothing about NakedObjects. But my question is not related to NakedObjects, I think.
My question is: What if I would like to add one more type to the StockType enum?
I know that means that I have to add it in the enum declaration. But what if I don&#039;t have access to that enum&#039;s source code?
For example, what if I&#039;m using an already made product and want to extend it to do little customization?]]></description>
		<content:encoded><![CDATA[<p>First of all, I am very sorry for commenting although I know nothing about NakedObjects. But my question is not related to NakedObjects, I think.<br />
My question is: What if I would like to add one more type to the StockType enum?<br />
I know that means that I have to add it in the enum declaration. But what if I don&#8217;t have access to that enum&#8217;s source code?<br />
For example, what if I&#8217;m using an already made product and want to extend it to do little customization?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casper Bang</title>
		<link>http://danhaywood.com/2010/03/06/simplifying-inheritance-hierarchies-using-powertypes-and-java-5-enums/#comment-123</link>
		<dc:creator><![CDATA[Casper Bang]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 11:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://danhaywood.com/?p=540#comment-123</guid>
		<description><![CDATA[Thanks for pointing out this technique. I had forgotten about it since reading about it in Effective Java.]]></description>
		<content:encoded><![CDATA[<p>Thanks for pointing out this technique. I had forgotten about it since reading about it in Effective Java.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

