<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bleis-tift</author_name>
  <author_url>https://blog.hatena.ne.jp/bleis-tift/</author_url>
  <blog_title>ぐるぐる～</blog_title>
  <blog_url>https://bleis-tift.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>OOP</anon>
  </categories>
  <description>final 周辺について。理想論？いや、理想論大事。 OCP (Open-Closed Principle) 開放閉鎖原則とも。 簡単に言うと、モジュール (ここでは class) は拡張できるべきだが、修正は行うべきではない、という原則。 これを原則に従うと、(もっと一般的な意味での) 修正が容易になる。 「拡張できるべき」と「修正は行うべきではない」を両立しないといけないので、一見、継承はこの原則を守るためには使っても良さそうなものだけど・・・ 実装の継承が OCP を破る例 例えば、 class Rectangle { int w; int h; Rectangle(int w, int…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20091015%2F1255614890&quot; title=&quot;final について？ - ぐるぐる～&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://ecx.images-amazon.com/images/I/51Y4DWH4N3L.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-10-15 22:54:50</published>
  <title>final について？</title>
  <type>rich</type>
  <url>https://bleis-tift.hatenablog.com/entry/20091015/1255614890</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
