<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.apidesign.org/skins/common/feed.css?116"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>OpenClass - Revision history</title>
		<link>http://wiki.apidesign.org/index.php?title=OpenClass&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.12.0rc1</generator>
		<lastBuildDate>Fri, 01 May 2026 19:49:13 GMT</lastBuildDate>
		<item>
			<title>JaroslavTulach at 08:49, 23 March 2009</title>
			<link>http://wiki.apidesign.org/index.php?title=OpenClass&amp;diff=2141&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 08:49, 23 March 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Clarity]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Clarity]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:APIDesignPatterns]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 23 Mar 2009 08:49:16 GMT</pubDate>			<dc:creator>JaroslavTulach</dc:creator>			<comments>http://wiki.apidesign.org/wiki/Talk:OpenClass</comments>		</item>
		<item>
			<title>Apidesign at 20:30, 27 December 2008</title>
			<link>http://wiki.apidesign.org/index.php?title=OpenClass&amp;diff=1819&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:30, 27 December 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On the other hand, as [[Singletonizer]] pattern shows, using this style in [[ProviderAPI]], where the ''open'' is done once by the [[API]] infrastructure is quite OK.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On the other hand, as [[Singletonizer]] pattern shows, using this style in [[ProviderAPI]], where the ''open'' is done once by the [[API]] infrastructure is quite OK.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Accuracy&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Clarity&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Sat, 27 Dec 2008 20:30:39 GMT</pubDate>			<dc:creator>Apidesign</dc:creator>			<comments>http://wiki.apidesign.org/wiki/Talk:OpenClass</comments>		</item>
		<item>
			<title>JaroslavTulach at 14:29, 26 December 2008</title>
			<link>http://wiki.apidesign.org/index.php?title=OpenClass&amp;diff=1816&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:29, 26 December 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.trivial.access&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.trivial.access&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;no longer compiles. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Instead &lt;/del&gt;of it one needs &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;to either use &lt;/del&gt;the [[OpenMethod]]:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;no longer compiles. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The problem is that '''provider''' is &lt;/ins&gt;of &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;unknown bound '''&amp;lt;?&amp;gt;'''. Whenever &lt;/ins&gt;it &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;is used, the compiler uses new ''unknown bound'', as such the call to getter returns &lt;/ins&gt;one &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;unknown type and the setter &lt;/ins&gt;needs &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;another unknown type. They are not &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;same. To work around that, one needs to create new &lt;/ins&gt;[[OpenMethod]]:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.openmethod&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.openmethod&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;or [[OpenClass]]:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;which ''opens'' the provider parameter and binds it to '''&amp;lt;C&amp;gt;''' bound. All references to that variable then represent the same type during the method execution &lt;/ins&gt;or &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;during existence of &lt;/ins&gt;[[OpenClass]] &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;instance&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.openclass&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.openclass&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Fri, 26 Dec 2008 14:29:52 GMT</pubDate>			<dc:creator>JaroslavTulach</dc:creator>			<comments>http://wiki.apidesign.org/wiki/Talk:OpenClass</comments>		</item>
		<item>
			<title>JaroslavTulach at 14:23, 26 December 2008</title>
			<link>http://wiki.apidesign.org/index.php?title=OpenClass&amp;diff=1815&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:23, 26 December 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The '''getActive''' and ''setActive''' methods could take '''ProjectConfiguration''' class as parameter, but that would not be correct - it would allow a user of the [[API]] to take configuration from one project and try to activate it on different one. By use of ''&amp;lt;Configuration extends ProjectConfiguration&amp;gt;'' bound, this is prevented. Yet, this very complicates life of clients of this API, as following code:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The '''getActive''' and ''setActive''' methods could take '''ProjectConfiguration''' class as parameter, but that would not be correct - it would allow a user of the [[API]] to take configuration from one project and try to activate it on different one. By use of ''&amp;lt;Configuration extends ProjectConfiguration&amp;gt;'' bound, this is prevented. Yet, this very complicates life of clients of this API, as following code:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;orig&lt;/del&gt;&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;correct.trivial.access&lt;/ins&gt;&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;no longer compiles. Instead of it one needs to either use the [[OpenMethod]]:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;no longer compiles. Instead of it one needs to either use the [[OpenMethod]]:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Fri, 26 Dec 2008 14:23:41 GMT</pubDate>			<dc:creator>JaroslavTulach</dc:creator>			<comments>http://wiki.apidesign.org/wiki/Talk:OpenClass</comments>		</item>
		<item>
			<title>JaroslavTulach: New page: When dealing with objects that produce and consume generic type of unknown bounds, it is necessary to ''open'' the type before its use. One can either use an OpenMethod or...</title>
			<link>http://wiki.apidesign.org/index.php?title=OpenClass&amp;diff=1806&amp;oldid=prev</link>
			<description>&lt;p&gt;New page: When dealing with objects that produce and consume &lt;a href=&quot;/wiki/Generics&quot; class=&quot;mw-redirect&quot; title=&quot;Generics&quot;&gt;generic type&lt;/a&gt; of unknown bounds, it is necessary to ''open'' the type before its use. One can either use an &lt;a href=&quot;/wiki/OpenMethod&quot; class=&quot;mw-redirect&quot; title=&quot;OpenMethod&quot;&gt;OpenMethod&lt;/a&gt; or...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When dealing with objects that produce and consume [[Generics|generic type]] of unknown bounds, it is necessary to ''open'' the type before its use. One can either use an [[OpenMethod]] or, in case the open needs to last longer than just during method execution, an [[OpenClass]].&lt;br /&gt;
&lt;br /&gt;
Imagine a [[Generics|generified]] API to access project configuration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct&amp;quot;/&amp;gt;&lt;br /&gt;
The '''getActive''' and ''setActive''' methods could take '''ProjectConfiguration''' class as parameter, but that would not be correct - it would allow a user of the [[API]] to take configuration from one project and try to activate it on different one. By use of ''&amp;lt;Configuration extends ProjectConfiguration&amp;gt;'' bound, this is prevented. Yet, this very complicates life of clients of this API, as following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.orig&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
no longer compiles. Instead of it one needs to either use the [[OpenMethod]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.openmethod&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or [[OpenClass]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;misuse.prjconfig.correct.openclass&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very annoying and definitely not [[Cluelessness|clueless]]! As such exposing patterns that require [[OpenClass]] or [[OpenMethod]] to [[ClientAPI]] users is not really recommended.&lt;br /&gt;
&lt;br /&gt;
On the other hand, as [[Singletonizer]] pattern shows, using this style in [[ProviderAPI]], where the ''open'' is done once by the [[API]] infrastructure is quite OK.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIDesignPatterns:Accuracy]]&lt;/div&gt;</description>
			<pubDate>Thu, 25 Dec 2008 16:26:09 GMT</pubDate>			<dc:creator>JaroslavTulach</dc:creator>			<comments>http://wiki.apidesign.org/wiki/Talk:OpenClass</comments>		</item>
	</channel>
</rss>